Compare commits

...

5 Commits

Author SHA1 Message Date
Fabio Niephaus
d0a541650c Bump version to v1.0.1. 2022-01-14 10:23:47 +01:00
Fabio Niephaus
136636a1a5 Build dev branch changes. 2022-01-14 10:23:47 +01:00
Fabio Niephaus
0584de3fce Drop support for building GraalVM from source.
Closes #3.
2022-01-14 10:20:26 +01:00
Fabio Niephaus
308aa6ad2b Update README.md. 2022-01-14 10:10:06 +01:00
Fabio Niephaus
edfd5f7c8d Tweak README.md. [ci skip] 2022-01-05 12:57:17 +01:00
10 changed files with 14 additions and 260 deletions

View File

@@ -9,6 +9,7 @@ on:
push: push:
branches: branches:
- main - main
- dev
paths-ignore: paths-ignore:
- '**.md' - '**.md'
pull_request: pull_request:

View File

@@ -1,9 +1,10 @@
name: 'build-test' name: 'build-test'
on: # rebuild any PRs and main branch changes on: # rebuild any PRs and main/dev branch changes
pull_request: pull_request:
push: push:
branches: branches:
- main - main
- dev
- 'releases/*' - 'releases/*'
jobs: jobs:
@@ -20,7 +21,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
version: [latest, dev, trunk] version: [latest, dev]
java-version: ['11'] java-version: ['11']
components: ['native-image'] components: ['native-image']
os: [macos-latest, windows-latest, ubuntu-latest] os: [macos-latest, windows-latest, ubuntu-latest]

View File

@@ -1,5 +1,5 @@
# GitHub Action for GraalVM [![build-test](https://github.com/graalvm/setup-graalvm/actions/workflows/test.yml/badge.svg)](https://github.com/graalvm/setup-graalvm/actions/workflows/test.yml) # GitHub Action for GraalVM [![build-test](https://github.com/graalvm/setup-graalvm/actions/workflows/test.yml/badge.svg)](https://github.com/graalvm/setup-graalvm/actions/workflows/test.yml)
This GitHub action sets up [GraalVM Community Edition][repo] and GraalVM components such as [Native Image][native-image] and [GraalVM languages][graalvm-languages]. This GitHub action sets up [GraalVM Community Edition][repo] and GraalVM components such as [Native Image][native-image] and [Truffle languages][truffle-languages].
## Key Features ## Key Features
@@ -8,7 +8,7 @@ This action:
- supports GraalVM CE [releases], [dev builds][dev-builds], and [Mandrel][mandrel] (see [options](#options)) - supports GraalVM CE [releases], [dev builds][dev-builds], and [Mandrel][mandrel] (see [options](#options))
- has built-in support for GraalVM components and the [GraalVM updater][gu] - has built-in support for GraalVM components and the [GraalVM updater][gu]
- exports a `$GRAALVM_HOME` environment variable - exports a `$GRAALVM_HOME` environment variable
- adds `$GRAALVM_HOME/bin` to the `$PATH` environment variable<br>(GraalVM tools such as `gu` and GraalVM languages can be invoked directly) - adds `$GRAALVM_HOME/bin` to the `$PATH` environment variable<br>(Truffle languages and tools can be invoked directly)
- sets `$JAVA_HOME` to `$GRAALVM_HOME` by default<br>(can be disabled via `set-java-home: 'false'`, see [options](#options)) - sets `$JAVA_HOME` to `$GRAALVM_HOME` by default<br>(can be disabled via `set-java-home: 'false'`, see [options](#options))
- sets up Windows environments with build tools using [vcvarsall.bat][vcvarsall] - sets up Windows environments with build tools using [vcvarsall.bat][vcvarsall]
@@ -89,7 +89,7 @@ jobs:
| Name | Default | Description | | Name | Default | Description |
|-----------------|:--------:|-------------| |-----------------|:--------:|-------------|
| `version`<br>*(required)* | n/a | `X.Y.Z` (e.g., `22.0.0`) for a specific [GraalVM release][releases]<br>`latest` for [latest stable release][stable],<br>`dev` for [latest dev build][dev-build],<br>`mandrel-X.Y.Z` (e.g., `mandrel-21.3.0.0-Final`) for a specific [Mandrel release][mandrel-releases], or<br>`mandrel-latest` for [latest Mandrel stable release][mandrel-stable]. | | `version`<br>*(required)* | n/a | `X.Y.Z` (e.g., `22.0.0`) for a specific [GraalVM release][releases]<br>`latest` for [latest stable release][stable],<br>`dev` for [latest dev build][dev-build],<br>`mandrel-X.Y.Z` (e.g., `mandrel-21.3.0.0-Final`) for a specific [Mandrel release][mandrel-releases],<br>`mandrel-latest` for [latest Mandrel stable release][mandrel-stable]. |
| `java-version`<br>*(required)* | n/a | `'11'` or `'17'` for a specific Java version.<br>(`'8'` and `'16'` are supported for GraalVM 21.2 and earlier.) | | `java-version`<br>*(required)* | n/a | `'11'` or `'17'` for a specific Java version.<br>(`'8'` and `'16'` are supported for GraalVM 21.2 and earlier.) |
| `components` | `''` | Comma-spearated list of GraalVM components (e.g., `native-image` or `ruby,nodejs`) that will be installed by the [GraalVM Updater][gu]. | | `components` | `''` | Comma-spearated list of GraalVM components (e.g., `native-image` or `ruby,nodejs`) that will be installed by the [GraalVM Updater][gu]. |
| `github-token` | `''` | Token for communication with the GitHub API. Please set to `${{ secrets.GITHUB_TOKEN }}` (see [templates](#templates)) to allow the action to authenticate with the GitHub API, which helps to reduce rate limiting issues. | | `github-token` | `''` | Token for communication with the GitHub API. Please set to `${{ secrets.GITHUB_TOKEN }}` (see [templates](#templates)) to allow the action to authenticate with the GitHub API, which helps to reduce rate limiting issues. |
@@ -104,7 +104,6 @@ Only pull requests from committers that can be verified as having signed the OCA
[dev-build]: https://github.com/graalvm/graalvm-ce-dev-builds/releases/latest [dev-build]: https://github.com/graalvm/graalvm-ce-dev-builds/releases/latest
[dev-builds]: https://github.com/graalvm/graalvm-ce-dev-builds [dev-builds]: https://github.com/graalvm/graalvm-ce-dev-builds
[graalvm-languages]: https://www.graalvm.org/reference-manual/languages/
[gu]: https://www.graalvm.org/reference-manual/graalvm-updater/ [gu]: https://www.graalvm.org/reference-manual/graalvm-updater/
[mandrel]: https://github.com/graalvm/mandrel [mandrel]: https://github.com/graalvm/mandrel
[mandrel-releases]: https://github.com/graalvm/mandrel/releases [mandrel-releases]: https://github.com/graalvm/mandrel/releases
@@ -114,4 +113,5 @@ Only pull requests from committers that can be verified as having signed the OCA
[releases]: https://github.com/graalvm/graalvm-ce-builds/releases [releases]: https://github.com/graalvm/graalvm-ce-builds/releases
[repo]: https://github.com/oracle/graal [repo]: https://github.com/oracle/graal
[stable]: https://github.com/graalvm/graalvm-ce-builds/releases/latest [stable]: https://github.com/graalvm/graalvm-ce-builds/releases/latest
[truffle-languages]: https://www.graalvm.org/reference-manual/languages/
[vcvarsall]: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line [vcvarsall]: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line

View File

@@ -7,7 +7,7 @@ branding:
inputs: inputs:
version: version:
required: true required: true
description: 'GraalVM version (release, latest, dev, trunk).' description: 'GraalVM version (release, latest, dev).'
java-version: java-version:
required: true required: true
description: 'Java version (11 or 17, 8 or 16 for older releases).' description: 'Java version (11 or 17, 8 or 16 for older releases).'

138
dist/index.js generated vendored
View File

@@ -7,14 +7,13 @@ require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.MANDREL_NAMESPACE = exports.JDK_HOME_SUFFIX = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_BASE = exports.VERSION_TRUNK = exports.VERSION_LATEST = exports.VERSION_DEV = exports.IS_WINDOWS = exports.IS_MACOS = void 0; exports.MANDREL_NAMESPACE = exports.JDK_HOME_SUFFIX = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_BASE = exports.VERSION_LATEST = exports.VERSION_DEV = exports.IS_WINDOWS = exports.IS_MACOS = void 0;
const os_1 = __nccwpck_require__(2037); const os_1 = __nccwpck_require__(2037);
const path_1 = __nccwpck_require__(1017); const path_1 = __nccwpck_require__(1017);
exports.IS_MACOS = process.platform === 'darwin'; exports.IS_MACOS = process.platform === 'darwin';
exports.IS_WINDOWS = process.platform === 'win32'; exports.IS_WINDOWS = process.platform === 'win32';
exports.VERSION_DEV = 'dev'; exports.VERSION_DEV = 'dev';
exports.VERSION_LATEST = 'latest'; exports.VERSION_LATEST = 'latest';
exports.VERSION_TRUNK = 'trunk';
exports.GRAALVM_BASE = (0, path_1.join)((0, os_1.homedir)(), '.graalvm'); exports.GRAALVM_BASE = (0, path_1.join)((0, os_1.homedir)(), '.graalvm');
exports.GRAALVM_FILE_EXTENSION = exports.IS_WINDOWS ? '.zip' : '.tar.gz'; exports.GRAALVM_FILE_EXTENSION = exports.IS_WINDOWS ? '.zip' : '.tar.gz';
exports.GRAALVM_GH_USER = 'graalvm'; exports.GRAALVM_GH_USER = 'graalvm';
@@ -96,131 +95,6 @@ function setUpDependencies(components) {
exports.setUpDependencies = setUpDependencies; exports.setUpDependencies = setUpDependencies;
/***/ }),
/***/ 7538:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.setUpGraalVMTrunk = void 0;
const c = __importStar(__nccwpck_require__(5105));
const core = __importStar(__nccwpck_require__(2186));
const tc = __importStar(__nccwpck_require__(7784));
const child_process_1 = __nccwpck_require__(2081);
const io_1 = __nccwpck_require__(7436);
const utils_1 = __nccwpck_require__(918);
const path_1 = __nccwpck_require__(1017);
const GRAALVM_TRUNK_DL = 'https://github.com/oracle/graal/archive/refs/heads/master.zip';
const GRAALVM_MX_DL = 'https://github.com/graalvm/mx/archive/refs/heads/master.zip';
const DEFAULT_SUITES = '/compiler,/regex,/sdk,/tools,/truffle';
const GRAAL_REPO_DIR = (0, path_1.join)(c.GRAALVM_BASE, 'graal');
const VM_DIR = (0, path_1.join)(GRAAL_REPO_DIR, 'vm');
const MX_DIR = (0, path_1.join)(c.GRAALVM_BASE, 'mx');
const MX_EXEC = c.IS_WINDOWS ? 'mx.cmd' : 'mx';
const SPAWN_OPTIONS = {
cwd: VM_DIR,
encoding: 'utf8',
stdio: 'inherit'
};
const COMPONENTS_TO_SUITE_NAME = new Map([
['espresso', '/espresso'],
['js', '/graal-js'],
['llvm-toolchain', '/sulong'],
['native-image', '/substratevm'],
['nodejs', '/graal-nodejs'],
['python', 'graalpython'],
['R', 'fastr'],
['ruby', 'truffleruby'],
['wasm', '/wasm']
]);
function setUpGraalVMTrunk(javaVersion, components) {
return __awaiter(this, void 0, void 0, function* () {
const jdkId = `labsjdk-ce-${javaVersion}`;
core.startGroup(`Downloading GraalVM sources, mx, and ${jdkId}...`);
yield tc.extractZip(yield tc.downloadTool(GRAALVM_TRUNK_DL), c.GRAALVM_BASE);
yield (0, io_1.mv)((0, path_1.join)(c.GRAALVM_BASE, 'graal-master'), GRAAL_REPO_DIR);
yield tc.extractZip(yield tc.downloadTool(GRAALVM_MX_DL), c.GRAALVM_BASE);
yield (0, io_1.mv)((0, path_1.join)(c.GRAALVM_BASE, 'mx-master'), MX_DIR);
core.addPath(MX_DIR);
core.debug(`"${MX_DIR}" added to $PATH`);
const labsJDKDir = (0, path_1.join)(c.GRAALVM_BASE, 'labsjdk');
yield (0, io_1.mkdirP)(labsJDKDir);
(0, child_process_1.spawnSync)(MX_EXEC, ['--java-home=', 'fetch-jdk', '--jdk-id', jdkId, '--to', labsJDKDir], SPAWN_OPTIONS);
const labsJDKHome = (0, utils_1.findJavaHomeInSubfolder)(labsJDKDir);
core.exportVariable('JAVA_HOME', labsJDKHome);
core.debug(`$JAVA_HOME set to "${labsJDKHome}"`);
core.endGroup();
const dynamicImports = toSuiteNames(components).join(',');
const mxArgs = [
'--no-download-progress',
'--disable-installables=true',
'--force-bash-launchers=true',
'--disable-libpolyglot',
'--exclude-components=LibGraal',
'--dynamicimports',
dynamicImports
];
if (core.isDebug()) {
(0, child_process_1.spawnSync)(MX_EXEC, mxArgs.concat('graalvm-show'), SPAWN_OPTIONS);
}
const graalvmHome = (0, child_process_1.spawnSync)(MX_EXEC, mxArgs.concat(['graalvm-home']), Object.assign(Object.assign({}, SPAWN_OPTIONS), { stdio: 'pipe' }));
core.startGroup('Building GraalVM CE from source...');
(0, child_process_1.spawnSync)(MX_EXEC, mxArgs.concat(['build']), SPAWN_OPTIONS);
core.endGroup();
const graalvmHomePath = graalvmHome.stdout.trim();
if (core.isDebug()) {
const cmd = c.IS_WINDOWS ? 'dir' : 'ls';
(0, child_process_1.spawnSync)(cmd, [graalvmHomePath], { stdio: 'inherit' });
}
return graalvmHomePath;
});
}
exports.setUpGraalVMTrunk = setUpGraalVMTrunk;
function toSuiteNames(components) {
const names = [DEFAULT_SUITES];
for (const component of components) {
const suiteName = COMPONENTS_TO_SUITE_NAME.get(component);
if (suiteName) {
names.push(suiteName);
}
else {
throw new Error(`Unsupported component: ${component}`);
}
}
return names;
}
/***/ }), /***/ }),
/***/ 1763: /***/ 1763:
@@ -401,7 +275,6 @@ const path_1 = __nccwpck_require__(1017);
const io_1 = __nccwpck_require__(7436); const io_1 = __nccwpck_require__(7436);
const dependencies_1 = __nccwpck_require__(6031); const dependencies_1 = __nccwpck_require__(6031);
const gu_1 = __nccwpck_require__(3466); const gu_1 = __nccwpck_require__(3466);
const graalvm_trunk_1 = __nccwpck_require__(7538);
const mandrel_1 = __nccwpck_require__(438); const mandrel_1 = __nccwpck_require__(438);
const msvc_1 = __nccwpck_require__(4765); const msvc_1 = __nccwpck_require__(4765);
function run() { function run() {
@@ -426,10 +299,6 @@ function run() {
case c.VERSION_DEV: case c.VERSION_DEV:
graalVMHome = yield graalvm.setUpGraalVMDevBuild(javaVersion); graalVMHome = yield graalvm.setUpGraalVMDevBuild(javaVersion);
break; break;
case c.VERSION_TRUNK:
core.warning("Building GraalVM from source is deprecated and will be removed on Jan 10, 2022. Please use the latest dev build instead (version: 'dev'). For more details see https://github.com/graalvm/setup-graalvm/issues/3");
graalVMHome = yield (0, graalvm_trunk_1.setUpGraalVMTrunk)(javaVersion, components);
break;
default: default:
if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) { if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) {
graalVMHome = yield (0, mandrel_1.setUpMandrel)(graalvmVersion, javaVersion); graalVMHome = yield (0, mandrel_1.setUpMandrel)(graalvmVersion, javaVersion);
@@ -448,10 +317,7 @@ function run() {
} }
// Set up GraalVM components (if any) // Set up GraalVM components (if any)
if (components.length > 0) { if (components.length > 0) {
if (graalvmVersion === c.VERSION_TRUNK) { if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) {
// components built from source, nothing to do
}
else if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) {
core.warning(`Mandrel does not support GraalVM components: ${componentsString}`); core.warning(`Mandrel does not support GraalVM components: ${componentsString}`);
} }
else { else {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "setup-graalvm", "name": "setup-graalvm",
"version": "1.0.0", "version": "1.0.1",
"private": true, "private": true,
"description": "GitHub Action for GraalVM", "description": "GitHub Action for GraalVM",
"main": "lib/main.js", "main": "lib/main.js",

View File

@@ -7,7 +7,6 @@ export const IS_WINDOWS = process.platform === 'win32'
export const VERSION_DEV = 'dev' export const VERSION_DEV = 'dev'
export const VERSION_LATEST = 'latest' export const VERSION_LATEST = 'latest'
export const VERSION_TRUNK = 'trunk'
export const GRAALVM_BASE = join(homedir(), '.graalvm') export const GRAALVM_BASE = join(homedir(), '.graalvm')
export const GRAALVM_FILE_EXTENSION = IS_WINDOWS ? '.zip' : '.tar.gz' export const GRAALVM_FILE_EXTENSION = IS_WINDOWS ? '.zip' : '.tar.gz'

View File

@@ -1,104 +0,0 @@
import * as c from './constants'
import * as core from '@actions/core'
import * as tc from '@actions/tool-cache'
import {SpawnSyncOptionsWithStringEncoding, spawnSync} from 'child_process'
import {mkdirP, mv} from '@actions/io'
import {findJavaHomeInSubfolder} from './utils'
import {join} from 'path'
const GRAALVM_TRUNK_DL =
'https://github.com/oracle/graal/archive/refs/heads/master.zip'
const GRAALVM_MX_DL =
'https://github.com/graalvm/mx/archive/refs/heads/master.zip'
const DEFAULT_SUITES = '/compiler,/regex,/sdk,/tools,/truffle'
const GRAAL_REPO_DIR = join(c.GRAALVM_BASE, 'graal')
const VM_DIR = join(GRAAL_REPO_DIR, 'vm')
const MX_DIR = join(c.GRAALVM_BASE, 'mx')
const MX_EXEC = c.IS_WINDOWS ? 'mx.cmd' : 'mx'
const SPAWN_OPTIONS: SpawnSyncOptionsWithStringEncoding = {
cwd: VM_DIR,
encoding: 'utf8',
stdio: 'inherit'
}
const COMPONENTS_TO_SUITE_NAME = new Map<string, string>([
['espresso', '/espresso'],
['js', '/graal-js'],
['llvm-toolchain', '/sulong'],
['native-image', '/substratevm'],
['nodejs', '/graal-nodejs'],
['python', 'graalpython'],
['R', 'fastr'],
['ruby', 'truffleruby'],
['wasm', '/wasm']
])
export async function setUpGraalVMTrunk(
javaVersion: string,
components: string[]
): Promise<string> {
const jdkId = `labsjdk-ce-${javaVersion}`
core.startGroup(`Downloading GraalVM sources, mx, and ${jdkId}...`)
await tc.extractZip(await tc.downloadTool(GRAALVM_TRUNK_DL), c.GRAALVM_BASE)
await mv(join(c.GRAALVM_BASE, 'graal-master'), GRAAL_REPO_DIR)
await tc.extractZip(await tc.downloadTool(GRAALVM_MX_DL), c.GRAALVM_BASE)
await mv(join(c.GRAALVM_BASE, 'mx-master'), MX_DIR)
core.addPath(MX_DIR)
core.debug(`"${MX_DIR}" added to $PATH`)
const labsJDKDir = join(c.GRAALVM_BASE, 'labsjdk')
await mkdirP(labsJDKDir)
spawnSync(
MX_EXEC,
['--java-home=', 'fetch-jdk', '--jdk-id', jdkId, '--to', labsJDKDir],
SPAWN_OPTIONS
)
const labsJDKHome = findJavaHomeInSubfolder(labsJDKDir)
core.exportVariable('JAVA_HOME', labsJDKHome)
core.debug(`$JAVA_HOME set to "${labsJDKHome}"`)
core.endGroup()
const dynamicImports = toSuiteNames(components).join(',')
const mxArgs = [
'--no-download-progress', // avoid cluttering the build log
'--disable-installables=true', // installables not needed
'--force-bash-launchers=true', // disable native launchers
'--disable-libpolyglot', // avoid building libpolyglot to save time
'--exclude-components=LibGraal', // avoid building libgraal to save time
'--dynamicimports',
dynamicImports
]
if (core.isDebug()) {
spawnSync(MX_EXEC, mxArgs.concat('graalvm-show'), SPAWN_OPTIONS)
}
const graalvmHome = spawnSync(MX_EXEC, mxArgs.concat(['graalvm-home']), {
...SPAWN_OPTIONS,
stdio: 'pipe'
})
core.startGroup('Building GraalVM CE from source...')
spawnSync(MX_EXEC, mxArgs.concat(['build']), SPAWN_OPTIONS)
core.endGroup()
const graalvmHomePath = graalvmHome.stdout.trim()
if (core.isDebug()) {
const cmd = c.IS_WINDOWS ? 'dir' : 'ls'
spawnSync(cmd, [graalvmHomePath], {stdio: 'inherit'})
}
return graalvmHomePath
}
function toSuiteNames(components: string[]): string[] {
const names = [DEFAULT_SUITES]
for (const component of components) {
const suiteName = COMPONENTS_TO_SUITE_NAME.get(component)
if (suiteName) {
names.push(suiteName)
} else {
throw new Error(`Unsupported component: ${component}`)
}
}
return names
}

View File

@@ -5,7 +5,6 @@ import {join} from 'path'
import {mkdirP} from '@actions/io' import {mkdirP} from '@actions/io'
import {setUpDependencies} from './dependencies' import {setUpDependencies} from './dependencies'
import {setUpGUComponents} from './gu' import {setUpGUComponents} from './gu'
import {setUpGraalVMTrunk} from './graalvm-trunk'
import {setUpMandrel} from './mandrel' import {setUpMandrel} from './mandrel'
import {setUpWindowsEnvironment} from './msvc' import {setUpWindowsEnvironment} from './msvc'
@@ -34,12 +33,6 @@ async function run(): Promise<void> {
case c.VERSION_DEV: case c.VERSION_DEV:
graalVMHome = await graalvm.setUpGraalVMDevBuild(javaVersion) graalVMHome = await graalvm.setUpGraalVMDevBuild(javaVersion)
break break
case c.VERSION_TRUNK:
core.warning(
"Building GraalVM from source is deprecated and will be removed on Jan 10, 2022. Please use the latest dev build instead (version: 'dev'). For more details see https://github.com/graalvm/setup-graalvm/issues/3"
)
graalVMHome = await setUpGraalVMTrunk(javaVersion, components)
break
default: default:
if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) { if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) {
graalVMHome = await setUpMandrel(graalvmVersion, javaVersion) graalVMHome = await setUpMandrel(graalvmVersion, javaVersion)
@@ -62,9 +55,7 @@ async function run(): Promise<void> {
// Set up GraalVM components (if any) // Set up GraalVM components (if any)
if (components.length > 0) { if (components.length > 0) {
if (graalvmVersion === c.VERSION_TRUNK) { if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) {
// components built from source, nothing to do
} else if (graalvmVersion.startsWith(c.MANDREL_NAMESPACE)) {
core.warning( core.warning(
`Mandrel does not support GraalVM components: ${componentsString}` `Mandrel does not support GraalVM components: ${componentsString}`
) )