Improve support for Mandrel distribution.

Fixes #48
This commit is contained in:
Fabio Niephaus 2023-06-20 11:56:28 +02:00
parent 85ea19c002
commit 578fd31702
No known key found for this signature in database
GPG Key ID: F21CF5275F31DFD6
3 changed files with 20 additions and 4 deletions

View File

@ -181,7 +181,13 @@ jobs:
matrix:
version: ['mandrel-22.2.0.0-Final', 'mandrel-latest']
java-version: ['17']
distribution: ['mandrel']
os: [windows-latest, ubuntu-latest]
include:
- version: 'mandrel-latest'
java-version: '17'
distribution: '' # test empty distribution for backward compatibility
os: ubuntu-linux
exclude: # temporarily disable Mandrel latest builds on Windows due to unavailability
- version: 'mandrel-latest'
java-version: '17'
@ -192,6 +198,7 @@ jobs:
uses: ./
with:
version: ${{ matrix.version }}
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check environment

5
dist/main/index.js generated vendored
View File

@ -71200,7 +71200,12 @@ function run() {
graalVMHome = yield graalvm.setUpGraalVMJDKCE(javaVersion);
break;
case c.DISTRIBUTION_MANDREL:
if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) {
graalVMHome = yield (0, mandrel_1.setUpMandrel)(graalvmVersion, javaVersion);
}
else {
throw new Error(`Mandrel requires the 'version' option (see https://github.com/graalvm/setup-graalvm/tree/main#options).`);
}
case '':
if (javaVersion === c.VERSION_DEV) {
core.info(`This build is using GraalVM Community Edition. To select a specific distribution, use the 'distribution' option (see https://github.com/graalvm/setup-graalvm/tree/main#options).`);

View File

@ -51,9 +51,13 @@ async function run(): Promise<void> {
graalVMHome = await graalvm.setUpGraalVMJDKCE(javaVersion)
break
case c.DISTRIBUTION_MANDREL:
if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) {
graalVMHome = await setUpMandrel(graalvmVersion, javaVersion)
} else {
throw new Error(
`Mandrel requires the 'version' option (see https://github.com/graalvm/setup-graalvm/tree/main#options).`
)
}
case '':
if (javaVersion === c.VERSION_DEV) {
core.info(