Skip to content

Commit 0fb3422

Browse files
committed
Use actions/cache/restore for the Maven repository caches and only store the non flowable packages
1 parent 078b50d commit 0fb3422

12 files changed

Lines changed: 67 additions & 19 deletions

File tree

.github/workflows/db2.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ jobs:
4343
with:
4444
distribution: 'zulu'
4545
java-version: 17
46+
- name: Restore Maven Repository Cache
47+
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
48+
with:
49+
path: ~/.m2/repository
50+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
51+
restore-keys: ${{ runner.os }}-maven-
4652
- name: Test
4753
id: test
4854
# use db2 for the host here because we have specified a container for the job.

.github/workflows/distro-check.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ jobs:
2323
- name: Cache Maven Repository
2424
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
2525
with:
26-
path: ~/.m2
27-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
28-
restore-keys: ${{ runner.os }}-m2
26+
path: |
27+
~/.m2/repository
28+
!~/.m2/repository/org/flowable
29+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
30+
restore-keys: ${{ runner.os }}-maven-
2931
- name: Verify Distribution
3032
run: ./mvnw verify -Pdeploy ${MAVEN_ARGS} -T 1C -DskipTests=true -Dgpg.skip=true
3133
- name: Upload Distribution Artifact

.github/workflows/flowable5.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,11 @@ jobs:
2323
with:
2424
distribution: 'zulu'
2525
java-version: 17
26+
- name: Restore Maven Repository Cache
27+
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
28+
with:
29+
path: ~/.m2/repository
30+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
31+
restore-keys: ${{ runner.os }}-maven-
2632
- name: Build and Test
2733
run: cd scripts && ./run-flowable5-tests.sh

.github/workflows/graal-native.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
with:
2222
java-version: 17
2323
distribution: graalvm
24-
- name: Cache Maven Repository
25-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
24+
- name: Restore Maven Repository Cache
25+
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
2626
with:
27-
path: ~/.m2
28-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
29-
restore-keys: ${{ runner.os }}-m2
27+
path: ~/.m2/repository
28+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
29+
restore-keys: ${{ runner.os }}-maven-
3030
- name: Install
3131
run: ./mvnw install -Pdistro,include-spring-boot-samples ${MAVEN_ARGS} -DskipTests=true -Dmaven.javadoc.skip=true
3232
- name: Test

.github/workflows/java-ea.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20-
- name: Cache Maven Repository
21-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
20+
- name: Restore Maven Repository Cache
21+
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
2222
with:
23-
path: ~/.m2
24-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
25-
restore-keys: ${{ runner.os }}-m2
23+
path: ~/.m2/repository
24+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25+
restore-keys: ${{ runner.os }}-maven-
2626
- name: 'Set up JDK'
2727
uses: oracle-actions/setup-java@fff43251af9936a0e6a4d5d0946e14f1680e9b6b # v1.5.0
2828
with:

.github/workflows/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
- name: Cache Maven Repository
2525
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
2626
with:
27-
path: ~/.m2
28-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
29-
restore-keys: ${{ runner.os }}-m2
27+
path: |
28+
~/.m2/repository
29+
!~/.m2/repository/org/flowable
30+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
31+
restore-keys: ${{ runner.os }}-maven-
3032
- name: Install
3133
# Need to do install first in order for the OSGi tests to work
3234
run: ./mvnw install ${MAVEN_ARGS} -DskipTests=true -Dmaven.javadoc.skip=true

.github/workflows/mariadb.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ jobs:
4141
with:
4242
distribution: 'zulu'
4343
java-version: 17
44+
- name: Restore Maven Repository Cache
45+
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
46+
with:
47+
path: ~/.m2/repository
48+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
49+
restore-keys: ${{ runner.os }}-maven-
4450
- name: Test
4551
id: test
4652
# use localhost for the host here because we have specified a vm for the job.

.github/workflows/mysql.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ jobs:
4141
with:
4242
distribution: 'zulu'
4343
java-version: 17
44+
- name: Restore Maven Repository Cache
45+
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
46+
with:
47+
path: ~/.m2/repository
48+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
49+
restore-keys: ${{ runner.os }}-maven-
4450
- name: Test
4551
id: test
4652
# use localhost for the host here because we have specified a vm for the job.

.github/workflows/oracle.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ jobs:
5151
with:
5252
distribution: 'zulu'
5353
java-version: 17
54+
- name: Restore Maven Repository Cache
55+
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
56+
with:
57+
path: ~/.m2/repository
58+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
59+
restore-keys: ${{ runner.os }}-maven-
5460
- name: Test
5561
id: test
5662
# use oracle for the host here because we have specified a container for the job.

.github/workflows/postgres.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jobs:
3636
with:
3737
distribution: 'zulu'
3838
java-version: 17
39+
- name: Restore Maven Repository Cache
40+
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
41+
with:
42+
path: ~/.m2/repository
43+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
44+
restore-keys: ${{ runner.os }}-maven-
3945
- name: Test
4046
id: test
4147
# use postgres for the host here because we have specified a container for the job.

0 commit comments

Comments
 (0)