Skip to content

Commit

Permalink
Merge pull request smallrye#82 from gastaldi/cache
Browse files Browse the repository at this point in the history
Cache maven local repository between builds
  • Loading branch information
dmlloyd authored Mar 8, 2021
2 parents 2595414 + 2dd1a90 commit 642edeb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
version: 8
targets: 'JAVA_HOME_8'

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: build with maven
run: mvn -B formatter:validate verify --file pom.xml -Djava8.home=$JAVA_HOME_8 -Djava9.home=$JAVA_HOME_9 -Djava10.home=$JAVA_HOME_10

Expand Down Expand Up @@ -82,6 +90,14 @@ jobs:
version: 8
targets: 'JAVA_HOME_8'

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: build with maven
shell: bash
run: mvn -B formatter:validate verify --file pom.xml -Djava8.home=$JAVA_HOME_8 -Djava9.home=$JAVA_HOME_9 -Djava10.home=$JAVA_HOME_10
Expand Down Expand Up @@ -117,6 +133,14 @@ jobs:
version: 8
targets: 'JAVA_HOME_8'

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: build with maven
run: mvn -B formatter:validate verify --file pom.xml -Djava8.home=$JAVA_HOME_8 -Djava9.home=$JAVA_HOME_9 -Djava10.home=$JAVA_HOME_10

Expand All @@ -132,6 +156,14 @@ jobs:
with:
version: 11

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: sonar
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down

0 comments on commit 642edeb

Please sign in to comment.