Skip to content

Commit 1778cb9

Browse files
committed
gh-action: separate java17 test jobs
Signed-off-by: yue9944882 <[email protected]>
1 parent 9c09e7c commit 1778cb9

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

.github/workflows/maven.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,35 @@ jobs:
2222
java-version: 8.0.x
2323
- name: Verify Format and License
2424
run: mvn spotless:check
25+
legacy-build:
26+
name: Legacy Java ${{ matrix.java }} Maven Test on ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
java: [ 8.0.x, 11.0.x ]
30+
os: [ macos-latest, windows-latest, ubuntu-latest ]
31+
runs-on: ${{ matrix.os }}
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: Setup Java
35+
uses: actions/setup-java@v3
36+
with:
37+
distribution: 'temurin'
38+
java-version: ${{ matrix.java }}
39+
- name: Cache local Maven repository
40+
uses: actions/cache@v3
41+
with:
42+
path: ~/.m2/repository
43+
key: ${{ runner.os }}-maven-${{ matrix.java }}-${{ hashFiles('pom.xml', '**/pom.xml') }}
44+
- name: Build with Maven
45+
run: |
46+
mvn clean test -q -B -Pcompatibility-before-java17 \
47+
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
2548
build:
2649
name: Java ${{ matrix.java }} Maven Test on ${{ matrix.os }}
2750
strategy:
2851
matrix:
2952
# Test against the LTS Java versions. TODO: add JDK18 when it becomes available.
30-
java: [ 8.0.x, 11.0.x, 17.0.x ]
53+
java: [ 17.0.x ]
3154
os: [ macos-latest, windows-latest, ubuntu-latest ]
3255
runs-on: ${{ matrix.os }}
3356
steps:
@@ -44,7 +67,7 @@ jobs:
4467
key: ${{ runner.os }}-maven-${{ matrix.java }}-${{ hashFiles('pom.xml', '**/pom.xml') }}
4568
- name: Build with Maven
4669
run: |
47-
mvn clean test -q -B --define=org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
70+
mvn clean test -q -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
4871
build-graalvm:
4972
runs-on: ubuntu-latest
5073
name: GraalVM Maven Test

pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,5 +561,21 @@ limitations under the License.
561561
<module>fluent-gen</module>
562562
</modules>
563563
</profile>
564+
<profile>
565+
<id>compatibility-before-java17</id>
566+
<modules>
567+
<module>util</module>
568+
<module>kubernetes</module>
569+
<module>proto</module>
570+
<module>extended</module>
571+
<module>fluent</module>
572+
<module>spring</module>
573+
<module>e2e</module>
574+
<module>examples</module>
575+
<module>client-java-contrib/cert-manager</module>
576+
<module>client-java-contrib/prometheus-operator</module>
577+
<module>client-java-contrib/admissionreview</module>
578+
</modules>
579+
</profile>
564580
</profiles>
565581
</project>

0 commit comments

Comments
 (0)