diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 68413c7..12f0735 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/dist/main/index.js b/dist/main/index.js index faa8001..094753b 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -71200,7 +71200,12 @@ function run() { graalVMHome = yield graalvm.setUpGraalVMJDKCE(javaVersion); break; case c.DISTRIBUTION_MANDREL: - throw new Error(`Mandrel requires the 'version' option (see https://github.com/graalvm/setup-graalvm/tree/main#options).`); + 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).`); diff --git a/src/main.ts b/src/main.ts index 3e9e177..cd97440 100644 --- a/src/main.ts +++ b/src/main.ts @@ -51,9 +51,13 @@ async function run(): Promise { graalVMHome = await graalvm.setUpGraalVMJDKCE(javaVersion) break case c.DISTRIBUTION_MANDREL: - throw new Error( - `Mandrel requires the 'version' option (see https://github.com/graalvm/setup-graalvm/tree/main#options).` - ) + 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(