mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-03-13 22:40:10 +08:00
Fix version check for gu and add a better warning.
This commit is contained in:
parent
ac032b0e7e
commit
0e29e36dce
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -35,6 +35,10 @@ jobs:
|
|||||||
- java-version: 'dev'
|
- java-version: 'dev'
|
||||||
distribution: ''
|
distribution: ''
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
- java-version: '17.0.7'
|
||||||
|
distribution: 'graalvm-community'
|
||||||
|
os: ubuntu-latest
|
||||||
|
components: 'native-image' # should print a warning but not fail
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Run setup-graalvm action
|
- name: Run setup-graalvm action
|
||||||
|
7
dist/main/index.js
generated
vendored
7
dist/main/index.js
generated
vendored
@ -71269,9 +71269,14 @@ function setUpGUComponents(javaVersion, graalVMVersion, graalVMHome, components,
|
|||||||
}
|
}
|
||||||
if (graalVMVersion === c.VERSION_DEV ||
|
if (graalVMVersion === c.VERSION_DEV ||
|
||||||
javaVersion === c.VERSION_DEV ||
|
javaVersion === c.VERSION_DEV ||
|
||||||
((0, semver_1.valid)(javaVersion) && (0, semver_1.gte)(javaVersion, '21'))) {
|
((0, semver_1.valid)(javaVersion) && (0, semver_1.gte)(javaVersion, '21.0.0'))) {
|
||||||
|
if (components.length == 1 && components[0] === 'native-image') {
|
||||||
|
core.warning(`Please remove "components: 'native-image'" from your workflow file. It is automatically included since GraalVM for JDK 17: https://github.com/oracle/graal/pull/5995`);
|
||||||
|
}
|
||||||
|
else {
|
||||||
core.warning(`Unable to install component(s): '${components.join(',')}'. The latest GraalVM dev builds and the upcoming GraalVM for JDK 21 no longer include the GraalVM Updater: https://github.com/oracle/graal/issues/6855`);
|
core.warning(`Unable to install component(s): '${components.join(',')}'. The latest GraalVM dev builds and the upcoming GraalVM for JDK 21 no longer include the GraalVM Updater: https://github.com/oracle/graal/issues/6855`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (graalVMVersion.startsWith(c.MANDREL_NAMESPACE)) {
|
else if (graalVMVersion.startsWith(c.MANDREL_NAMESPACE)) {
|
||||||
core.warning(`Mandrel does not support GraalVM component(s): '${components.join(',')}'`);
|
core.warning(`Mandrel does not support GraalVM component(s): '${components.join(',')}'`);
|
||||||
}
|
}
|
||||||
|
@ -37,13 +37,19 @@ export async function setUpGUComponents(
|
|||||||
if (
|
if (
|
||||||
graalVMVersion === c.VERSION_DEV ||
|
graalVMVersion === c.VERSION_DEV ||
|
||||||
javaVersion === c.VERSION_DEV ||
|
javaVersion === c.VERSION_DEV ||
|
||||||
(semverValid(javaVersion) && semverGte(javaVersion, '21'))
|
(semverValid(javaVersion) && semverGte(javaVersion, '21.0.0'))
|
||||||
) {
|
) {
|
||||||
|
if (components.length == 1 && components[0] === 'native-image') {
|
||||||
|
core.warning(
|
||||||
|
`Please remove "components: 'native-image'" from your workflow file. It is automatically included since GraalVM for JDK 17: https://github.com/oracle/graal/pull/5995`
|
||||||
|
)
|
||||||
|
} else {
|
||||||
core.warning(
|
core.warning(
|
||||||
`Unable to install component(s): '${components.join(
|
`Unable to install component(s): '${components.join(
|
||||||
','
|
','
|
||||||
)}'. The latest GraalVM dev builds and the upcoming GraalVM for JDK 21 no longer include the GraalVM Updater: https://github.com/oracle/graal/issues/6855`
|
)}'. The latest GraalVM dev builds and the upcoming GraalVM for JDK 21 no longer include the GraalVM Updater: https://github.com/oracle/graal/issues/6855`
|
||||||
)
|
)
|
||||||
|
}
|
||||||
} else if (graalVMVersion.startsWith(c.MANDREL_NAMESPACE)) {
|
} else if (graalVMVersion.startsWith(c.MANDREL_NAMESPACE)) {
|
||||||
core.warning(
|
core.warning(
|
||||||
`Mandrel does not support GraalVM component(s): '${components.join(',')}'`
|
`Mandrel does not support GraalVM component(s): '${components.join(',')}'`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user