From c9c954d5c6e1ede16783c96426c8006aad069575 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sun, 17 Nov 2024 19:52:07 +0100 Subject: [PATCH] CI: build and test on JDK 24-ea - java hints job remains on 23 and has to wait for nb-javac 24 - bump CV tests from JDK 22 to 23 - minor cleanup --- .github/workflows/main.yml | 29 +++++++------------ ide/ide.kit/nbproject/project.properties | 2 +- .../fileobjects/StatFilesTest.java | 2 +- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8144307b8d41..3d07df0418ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -124,7 +124,7 @@ jobs: timeout-minutes: 40 strategy: matrix: - java: [ '17', '21', '23' ] + java: [ '17', '21', '24-ea' ] exclude: - java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }} fail-fast: false @@ -229,7 +229,7 @@ jobs: java: [ 17 ] include: - os: ubuntu-latest - java: 22 + java: 23 fail-fast: false steps: @@ -416,30 +416,23 @@ jobs: - name: Build nbms run: ant $OPTS build-nbms + # runs only in PRs if requested; ~18 min + - name: Build all Tests + if: env.test_tests == 'true' && github.event_name == 'pull_request' && success() + run: ant -quiet -Dcluster.config=$CLUSTER_CONFIG test -Dtest.includes=NoTestsJustBuild + # 13-14 min for javadoc; JDK version must be synced with nb-javac - - name: Set up JDK 23 for javadoc + - name: Set up JDK 24-ea for javadoc if: env.test_javadoc == 'true' && success() uses: actions/setup-java@v4 with: - java-version: 23 + java-version: 24-ea distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }} - name: Build javadoc if: env.test_javadoc == 'true' && success() run: ant $OPTS build-javadoc - - name: Set up JDK ${{ matrix.java }} - if: env.test_javadoc == 'true' && success() - uses: actions/setup-java@v4 - with: - java-version: ${{ matrix.java }} - distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }} - - # runs only in PRs if requested; ~18 min - - name: Build all Tests - if: env.test_tests == 'true' && github.event_name == 'pull_request' && success() - run: ant -quiet -Dcluster.config=$CLUSTER_CONFIG test -Dtest.includes=NoTestsJustBuild - - name: Create Test Summary uses: test-summary/action@v2 if: failure() @@ -834,7 +827,7 @@ jobs: timeout-minutes: 50 strategy: matrix: - java: [ '17', '21', '23' ] + java: [ '17', '21', '24-ea' ] exclude: - java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }} fail-fast: false @@ -1494,7 +1487,7 @@ jobs: timeout-minutes: 60 strategy: matrix: - java: [ '17', '21', '23' ] + java: [ '17', '21', '24-ea' ] exclude: - java: ${{ github.event_name == 'pull_request' && 'nothing' || '21' }} fail-fast: false diff --git a/ide/ide.kit/nbproject/project.properties b/ide/ide.kit/nbproject/project.properties index 44081a96bbf6..32b952f319d2 100644 --- a/ide/ide.kit/nbproject/project.properties +++ b/ide/ide.kit/nbproject/project.properties @@ -50,5 +50,5 @@ test.jms.flags=\ --add-opens=java.desktop/javax.swing.plaf.synth=ALL-UNNAMED \ --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED \ --add-opens=java.desktop/sun.awt=ALL-UNNAMED \ - --add-modules=jdk.jdwp.agent,jdk.attach,jdk.jdi,jdk.jshell,java.compiler,jdk.compiler,jdk.management,jdk.unsupported,jdk.internal.le,jdk.internal.ed,jdk.internal.opt,jdk.internal.jvmstat \ + --add-modules=java.compiler \ --add-exports=jdk.jdi/com.sun.jdi=ALL-UNNAMED diff --git a/platform/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/StatFilesTest.java b/platform/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/StatFilesTest.java index 9a9015fd0125..440017aae2a5 100644 --- a/platform/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/StatFilesTest.java +++ b/platform/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/StatFilesTest.java @@ -163,7 +163,7 @@ public void testLockFile() throws IOException { expectedCount++; // sun.awt.PlatformGraphicsInfo.getDefaultHeadlessProperty probes a .so or .dylib // Runtime.version().feature() > 18 - if (Integer.parseInt(System.getProperty("java.version").split("\\.")[0]) > 18) { + if (Integer.parseInt(System.getProperty("java.version").split("\\.")[0].split("-")[0]) > 18) { expectedCount++; } }