Skip to content

Commit 4cc5a27

Browse files
authoredApr 22, 2024
[CI] Add Java 21 compiling to J17 and native J21 (openhab#16672)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
1 parent f466c88 commit 4cc5a27

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed
 

‎.github/workflows/ci-build.yml

+24-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
java: [ '17' ]
21+
java: [ '17', '21', 'profile-j21' ]
2222
maven: [ '3.9.6' ]
2323
os: [ 'ubuntu-22.04' ]
2424
name: Build (Java ${{ matrix.java }}, ${{ matrix.os }})
@@ -46,10 +46,18 @@ jobs:
4646
4747
- name: Set up Java ${{ matrix.java }}
4848
uses: actions/setup-java@v4
49+
if: ${{ matrix.java != 'profile-j21' }}
4950
with:
5051
distribution: 'temurin'
5152
java-version: ${{ matrix.java }}
5253

54+
- name: Set up Java ${{ matrix.java }}
55+
uses: actions/setup-java@v4
56+
if: ${{ matrix.java == 'profile-j21' }}
57+
with:
58+
distribution: 'temurin'
59+
java-version: ${{ 21 }}
60+
5361
- name: Set up Maven ${{ matrix.maven }}
5462
uses: stCarolas/setup-maven@v5
5563
with:
@@ -69,6 +77,7 @@ jobs:
6977
format: 'csv'
7078

7179
- name: Build
80+
if: ${{ matrix.java != 'profile-j21' }}
7281
id: build
7382
run: './.github/scripts/maven-build'
7483
env:
@@ -79,15 +88,27 @@ jobs:
7988
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25
8089
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
8190
91+
- name: Build
92+
if: ${{ matrix.java == 'profile-j21' }}
93+
id: build-j21
94+
run: './.github/scripts/maven-build clean verify -B -T 1.5C -U -Pj21'
95+
env:
96+
CHANGED_FILES: ${{ steps.files.outputs.all }}
97+
MAVEN_OPTS: >-
98+
-Xmx2g
99+
-Dmaven.wagon.http.retryHandler.count=5
100+
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25
101+
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
102+
82103
- name: Upload Build Log
83-
if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
104+
if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure') || (steps.build-j21.outcome == 'success') || (steps.build-j21.outcome == 'failure')) }}
84105
uses: actions/upload-artifact@v4
85106
with:
86107
name: build-log-java-${{ matrix.java }}-${{ matrix.os }}
87108
path: build.log
88109

89110
- name: Upload SAT Summary Report
90-
if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
111+
if: ${{ matrix.java == '17' && always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
91112
uses: actions/upload-artifact@v4
92113
with:
93114
name: sat-summary-report

0 commit comments

Comments
 (0)