Skip to content

Commit 9544767

Browse files
Remove Java 17 build, switch to 21 (openhab#17910)
Signed-off-by: Holger Friedrich <[email protected]>
1 parent 639a1cb commit 9544767

File tree

2 files changed

+9
-30
lines changed

2 files changed

+9
-30
lines changed

.github/workflows/ci-build.yml

+5-26
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', 'profile-j21' ]
21+
java: [ '21' ]
2222
maven: [ '3.9.9' ]
2323
os: [ 'ubuntu-24.04' ]
2424
name: Build (Java ${{ matrix.java }}, ${{ matrix.os }})
@@ -46,25 +46,17 @@ jobs:
4646
4747
- name: Set up Java ${{ matrix.java }}
4848
uses: actions/setup-java@v4
49-
if: ${{ matrix.java != 'profile-j21' }}
5049
with:
5150
distribution: 'temurin'
5251
java-version: ${{ matrix.java }}
5352

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-
6153
- name: Set up Maven ${{ matrix.maven }}
6254
uses: stCarolas/setup-maven@v5
6355
with:
6456
maven-version: ${{ matrix.maven }}
6557

6658
- name: Register Problem Matchers
67-
if: ${{ matrix.java == '17' }}
59+
if: ${{ matrix.java == '21' }}
6860
id: problem_matchers
6961
run: |
7062
echo "::add-matcher::.github/openhab-compile-problems.json"
@@ -77,7 +69,6 @@ jobs:
7769
format: 'csv'
7870

7971
- name: Build
80-
if: ${{ matrix.java != 'profile-j21' }}
8172
id: build
8273
run: './.github/scripts/maven-build'
8374
env:
@@ -88,34 +79,22 @@ jobs:
8879
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25
8980
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
9081
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-
10382
- name: Upload Build Log
104-
if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure') || (steps.build-j21.outcome == 'success') || (steps.build-j21.outcome == 'failure')) }}
83+
if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
10584
uses: actions/upload-artifact@v4
10685
with:
10786
name: build-log-java-${{ matrix.java }}-${{ matrix.os }}
10887
path: build.log
10988

11089
- name: Upload SAT Summary Report
111-
if: ${{ matrix.java == '17' && always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
90+
if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
11291
uses: actions/upload-artifact@v4
11392
with:
11493
name: sat-summary-report
11594
path: target/summary_report.html
11695

11796
- name: Report SAT Errors as Annotations
118-
if: ${{ matrix.java == '17' && always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
97+
if: ${{ matrix.java == '21' && always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
11998
uses: ghys/checkstyle-github-action@main
12099
with:
121100
title: CheckStyle Violations

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<properties>
6464
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6565
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
66-
<oh.java.version>17</oh.java.version>
66+
<oh.java.version>21</oh.java.version>
6767
<maven.compiler.release>${oh.java.version}</maven.compiler.release>
6868

6969
<ohc.version>5.0.0-SNAPSHOT</ohc.version>
@@ -639,7 +639,7 @@ Import-Package: \\
639639
<version>3.6.3</version>
640640
</requireMavenVersion>
641641
<requireJavaVersion>
642-
<version>[17.0,18.0),[21.0,22.0)</version>
642+
<version>[21.0,22.0)</version>
643643
</requireJavaVersion>
644644
</rules>
645645
</configuration>
@@ -825,9 +825,9 @@ Import-Package: \\
825825
</build>
826826
</profile>
827827
<profile>
828-
<id>j21</id>
828+
<id>j17</id>
829829
<properties>
830-
<oh.java.version>21</oh.java.version>
830+
<oh.java.version>17</oh.java.version>
831831
<maven.compiler.release>${oh.java.version}</maven.compiler.release>
832832
</properties>
833833
</profile>

0 commit comments

Comments
 (0)