Skip to content

Commit 578ab81

Browse files
committed
Improve caching
1 parent 3fe3ba8 commit 578ab81

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

.github/workflows/check-build.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ jobs:
2626
build:
2727
runs-on: ubuntu-latest
2828
timeout-minutes: 30
29-
3029
strategy:
3130
matrix:
32-
java: [11, 17, 21]
31+
java: [17, 21]
3332
distribution: [temurin]
34-
3533
steps:
3634
- uses: actions/checkout@v5
3735

@@ -43,8 +41,7 @@ jobs:
4341
cache: 'maven'
4442

4543
- name: Build with Maven
46-
# Java 17 is required for tests
47-
run: ./mvnw -B clean package ${{ matrix.java >=17 && '-P run-integration-tests' || '-Dmaven.test.skip=true' }}
44+
run: ./mvnw -B clean package -P run-integration-tests
4845

4946
- name: Check for uncommited changes
5047
run: |
@@ -79,6 +76,31 @@ jobs:
7976
path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/screenshots
8077
if-no-files-found: ignore
8178

79+
# Ensure compatibility with Java 11
80+
# See https://github.com/xdev-software/chartjs-java-model/issues/14
81+
build-legacy-java-11:
82+
runs-on: ubuntu-latest
83+
timeout-minutes: 30
84+
steps:
85+
- uses: actions/checkout@v5
86+
87+
- name: Set up JDK
88+
uses: actions/setup-java@v5
89+
with:
90+
distribution: temurin
91+
java-version: 11
92+
93+
- name: Cache Maven
94+
uses: actions/cache@v4
95+
with:
96+
path: ~/.m2/repository
97+
key: ${{ runner.os }}-mvn-java-11-${{ hashFiles('**/pom.xml') }}
98+
restore-keys: |
99+
${{ runner.os }}-mvn-java-11-
100+
101+
- name: Build with Maven
102+
run: ./mvnw -B clean package -Dmaven.test.skip=true
103+
82104
checkstyle:
83105
runs-on: ubuntu-latest
84106
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}

0 commit comments

Comments
 (0)