From e01b65d7cfdbd5917baa6437205e2e05ea1e3396 Mon Sep 17 00:00:00 2001 From: Azat Abdullin Date: Thu, 18 Jan 2024 12:22:10 +0100 Subject: [PATCH] use maven cache in github actions --- .github/workflows/jdk11-ci.yml | 9 +++++++++ .github/workflows/jdk17-ci.yml | 9 +++++++++ .github/workflows/jdk8-cd.yml | 9 +++++++++ .github/workflows/jdk8-ci.yml | 9 +++++++++ 4 files changed, 36 insertions(+) diff --git a/.github/workflows/jdk11-ci.yml b/.github/workflows/jdk11-ci.yml index 5ad3aba77..e9d8c1fba 100644 --- a/.github/workflows/jdk11-ci.yml +++ b/.github/workflows/jdk11-ci.yml @@ -18,6 +18,15 @@ jobs: uses: actions/setup-java@v1 with: java-version: 11 + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build with Maven run: mvn verify -Pfull-smt --file pom.xml -s .github/github-settings.xml env: diff --git a/.github/workflows/jdk17-ci.yml b/.github/workflows/jdk17-ci.yml index a6967dcf9..c67cfb425 100644 --- a/.github/workflows/jdk17-ci.yml +++ b/.github/workflows/jdk17-ci.yml @@ -18,6 +18,15 @@ jobs: uses: actions/setup-java@v1 with: java-version: 17 + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build with Maven run: mvn verify -Pfull-smt --file pom.xml -s .github/github-settings.xml env: diff --git a/.github/workflows/jdk8-cd.yml b/.github/workflows/jdk8-cd.yml index 7a08ecf16..769560179 100644 --- a/.github/workflows/jdk8-cd.yml +++ b/.github/workflows/jdk8-cd.yml @@ -15,6 +15,15 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build sources id: build run: | diff --git a/.github/workflows/jdk8-ci.yml b/.github/workflows/jdk8-ci.yml index 442d17545..e9a597c4c 100644 --- a/.github/workflows/jdk8-ci.yml +++ b/.github/workflows/jdk8-ci.yml @@ -18,6 +18,15 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build with Maven run: mvn verify -Pfull-smt --file pom.xml -s .github/github-settings.xml env: