Skip to content

Commit 31bd941

Browse files
yrodiereDavideD
authored andcommitted
Use --enable-preview when testing against JDK 19
1 parent d17077b commit 31bd941

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ jobs:
146146
- { name: "11", java_version_numeric: 11 }
147147
- { name: "17", java_version_numeric: 17 }
148148
- { name: "18", java_version_numeric: 18, from: 'jdk.java.net' }
149-
- { name: "19-ea", java_version_numeric: 19, from: 'jdk.java.net' }
149+
# We want to enable preview features when testing early-access builds of OpenJDK:
150+
# even if we don't use these features, just enabling them can cause side effects
151+
# and it's useful to test that.
152+
- { name: "19-ea", java_version_numeric: 19, from: 'jdk.java.net', jvm_args: '--enable-preview' }
150153
steps:
151154
- uses: actions/checkout@v2
152155
- name: Get year/month for cache key
@@ -196,7 +199,8 @@ jobs:
196199
- name: Build and Test with Java ${{ matrix.java.name }}
197200
run: |
198201
./gradlew build -PshowStandardOutput -Pdocker -Ptest.jdk.version=${{ matrix.java.java_version_numeric }} \
199-
-Porg.gradle.java.installations.paths=${{ steps.mainjdk-exportpath.outputs.path }},${{ steps.testjdk-exportpath.outputs.path }}
202+
-Porg.gradle.java.installations.paths=${{ steps.mainjdk-exportpath.outputs.path }},${{ steps.testjdk-exportpath.outputs.path }} \
203+
${{ matrix.java.jvm_args && '-Ptest.jdk.launcher.args=' }}${{ matrix.java.jvm_args }}
200204
- name: Upload reports (if build failed)
201205
uses: actions/upload-artifact@v2
202206
if: failure()

0 commit comments

Comments
 (0)