Skip to content

Commit ffcc7b0

Browse files
committed
Explicitly regain full control over caching
1 parent 578ab81 commit ffcc7b0

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/check-build.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,14 @@ jobs:
3838
with:
3939
distribution: ${{ matrix.distribution }}
4040
java-version: ${{ matrix.java }}
41-
cache: 'maven'
41+
42+
- name: Cache Maven
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.m2/repository
46+
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
47+
restore-keys: |
48+
${{ runner.os }}-mvn-build-
4249
4350
- name: Build with Maven
4451
run: ./mvnw -B clean package -P run-integration-tests
@@ -78,7 +85,7 @@ jobs:
7885

7986
# Ensure compatibility with Java 11
8087
# See https://github.com/xdev-software/chartjs-java-model/issues/14
81-
build-legacy-java-11:
88+
build-java-11:
8289
runs-on: ubuntu-latest
8390
timeout-minutes: 30
8491
steps:
@@ -94,9 +101,9 @@ jobs:
94101
uses: actions/cache@v4
95102
with:
96103
path: ~/.m2/repository
97-
key: ${{ runner.os }}-mvn-java-11-${{ hashFiles('**/pom.xml') }}
104+
key: ${{ runner.os }}-mvn-build-java-11-${{ hashFiles('**/pom.xml') }}
98105
restore-keys: |
99-
${{ runner.os }}-mvn-java-11-
106+
${{ runner.os }}-mvn-build-java-11-
100107
101108
- name: Build with Maven
102109
run: ./mvnw -B clean package -Dmaven.test.skip=true

0 commit comments

Comments
 (0)