Support new GraalVM for JDK17/JDK20 release

This commit adds support for the new GraalVM for JDK17/JDK20 release, including the new Oracle GraalVM distribution.
For this, users only need to specify the 'java-version' option and the new 'distribution' option.
The 'version' option is now marked as optional and kept for compatibility with older GraalVM releases and Mandrel.
This commit is contained in:
Fabio Niephaus
2023-06-16 09:19:49 +02:00
committed by Fabio Niephaus
parent 2f50b91043
commit c871f91ee0
14 changed files with 756 additions and 216 deletions

View File

@@ -8,6 +8,17 @@ export async function checkForUpdates(
graalVMVersion: string,
javaVersion: string
): Promise<void> {
if (
graalVMVersion.length > 0 &&
(javaVersion === '17' || javaVersion === '19')
) {
const recommendedJDK = javaVersion === '17' ? '17' : '20'
core.notice(
`A new GraalVM release is available! Please consider upgrading to GraalVM for JDK ${recommendedJDK}. Release notes: https://www.graalvm.org/release-notes/JDK_${recommendedJDK}/`
)
return
}
if (graalVMVersion.startsWith('22.3.') && javaVersion === '11') {
core.notice(
'Please consider upgrading your project to Java 17+. GraalVM 22.3.X releases are the last to support JDK11: https://github.com/oracle/graal/issues/5063'

View File

@@ -88,6 +88,7 @@ export async function setUpNativeImageBuildReports(
const isSupported =
graalVMVersion === c.VERSION_LATEST ||
graalVMVersion === c.VERSION_DEV ||
graalVMVersion.length === 0 ||
(!graalVMVersion.startsWith(c.MANDREL_NAMESPACE) &&
gte(toSemVer(graalVMVersion), '22.2.0'))
if (!isSupported) {