Skip to content

Commit

Permalink
Fix version check for gu and add a better warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Sep 6, 2023
1 parent ac032b0 commit 0e29e36
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
- java-version: 'dev'
distribution: ''
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:
- uses: actions/checkout@v3
- name: Run setup-graalvm action
Expand Down
9 changes: 7 additions & 2 deletions dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions src/gu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@ export async function setUpGUComponents(
if (
graalVMVersion === c.VERSION_DEV ||
javaVersion === c.VERSION_DEV ||
(semverValid(javaVersion) && semverGte(javaVersion, '21'))
(semverValid(javaVersion) && semverGte(javaVersion, '21.0.0'))
) {
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`
)
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`
)
}
} else if (graalVMVersion.startsWith(c.MANDREL_NAMESPACE)) {
core.warning(
`Mandrel does not support GraalVM component(s): '${components.join(',')}'`
Expand Down

0 comments on commit 0e29e36

Please sign in to comment.