Rename nightly to dev builds.

This commit is contained in:
Fabio Niephaus 2022-01-03 13:11:04 +01:00
parent a44c598f75
commit 7a1abedd1b
No known key found for this signature in database
GPG Key ID: F21CF5275F31DFD6
8 changed files with 27 additions and 26 deletions

View File

@ -20,7 +20,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
version: [latest, nightly, trunk] version: [latest, dev, trunk]
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

@ -5,7 +5,7 @@ This GitHub action sets up [GraalVM Community Edition][repo] and GraalVM compone
This action: This action:
- supports GraalVM CE [releases], [nightly builds][nightly], and building from [source][repo] (see [options](#options)) - supports GraalVM CE [releases], [dev builds][dev-builds], and building from [source][repo] (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>(GraalVM tools such as `gu` and GraalVM languages can be invoked directly)
@ -51,7 +51,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
version: [latest, nightly, '21.3.0'] version: [latest, dev, '21.3.0']
os: [macos-latest, windows-latest, ubuntu-latest] os: [macos-latest, windows-latest, ubuntu-latest]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -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>`nightly` for [latest nightly build][nightly],<br>`trunk` for building GraalVM from [source][repo] (slow, can take several minutes). | | `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>`trunk` for building GraalVM from [source][repo] (slow, can take several minutes). |
| `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. |
@ -102,10 +102,11 @@ We welcome code contributions. To get started, you will need to sign the [Oracle
Only pull requests from committers that can be verified as having signed the OCA can be accepted. Only pull requests from committers that can be verified as having signed the OCA can be accepted.
[dev-build]: https://github.com/graalvm/graalvm-ce-dev-builds/releases/latest
[dev-builds]: https://github.com/graalvm/graalvm-ce-dev-builds
[graalvm-languages]: https://www.graalvm.org/reference-manual/languages/ [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/
[native-image]: https://www.graalvm.org/native-image/ [native-image]: https://www.graalvm.org/native-image/
[nightly]: https://github.com/graalvm/graalvm-ce-dev-builds/releases/latest
[oca]: https://oca.opensource.oracle.com [oca]: https://oca.opensource.oracle.com
[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

View File

@ -7,7 +7,7 @@ branding:
inputs: inputs:
version: version:
required: true required: true
description: 'GraalVM version (release, latest, nightly, trunk).' description: 'GraalVM version (release, latest, dev, trunk).'
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).'

22
dist/index.js generated vendored
View File

@ -7,13 +7,13 @@ require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.JDK_HOME_SUFFIX = exports.GRAALVM_PLATFORM = exports.GRAALVM_GH_USER = exports.GRAALVM_FILE_EXTENSION = exports.GRAALVM_BASE = exports.VERSION_TRUNK = exports.VERSION_NIGHTLY = exports.VERSION_LATEST = exports.IS_WINDOWS = exports.IS_MACOS = void 0; 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;
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_LATEST = 'latest'; exports.VERSION_LATEST = 'latest';
exports.VERSION_NIGHTLY = 'nightly';
exports.VERSION_TRUNK = 'trunk'; 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';
@ -255,11 +255,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}); });
}; };
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.setUpGraalVMRelease = exports.setUpGraalVMNightly = exports.setUpGraalVMLatest = void 0; exports.setUpGraalVMRelease = exports.setUpGraalVMDevBuild = exports.setUpGraalVMLatest = void 0;
const c = __importStar(__nccwpck_require__(5105)); const c = __importStar(__nccwpck_require__(5105));
const utils_1 = __nccwpck_require__(918); const utils_1 = __nccwpck_require__(918);
const GRAALVM_CE_DL_BASE = 'https://github.com/graalvm/graalvm-ce-builds/releases/download'; const GRAALVM_CE_DL_BASE = 'https://github.com/graalvm/graalvm-ce-builds/releases/download';
const GRAALVM_REPO_NIGHTLY = 'graalvm-ce-dev-builds'; const GRAALVM_REPO_DEV_BUILDS = 'graalvm-ce-dev-builds';
const GRAALVM_REPO_RELEASES = 'graalvm-ce-builds'; const GRAALVM_REPO_RELEASES = 'graalvm-ce-builds';
const GRAALVM_TAG_PREFIX = 'vm-'; const GRAALVM_TAG_PREFIX = 'vm-';
function setUpGraalVMLatest(javaVersion) { function setUpGraalVMLatest(javaVersion) {
@ -274,20 +274,20 @@ function setUpGraalVMLatest(javaVersion) {
}); });
} }
exports.setUpGraalVMLatest = setUpGraalVMLatest; exports.setUpGraalVMLatest = setUpGraalVMLatest;
function setUpGraalVMNightly(javaVersion) { function setUpGraalVMDevBuild(javaVersion) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const latestNightly = yield (0, utils_1.getLatestRelease)(GRAALVM_REPO_NIGHTLY); const latestDevBuild = yield (0, utils_1.getLatestRelease)(GRAALVM_REPO_DEV_BUILDS);
const graalVMIdentifier = determineGraalVMIdentifier('dev', javaVersion); const graalVMIdentifier = determineGraalVMIdentifier('dev', javaVersion);
const expectedFileName = `${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`; const expectedFileName = `${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`;
for (const asset of latestNightly.assets) { for (const asset of latestDevBuild.assets) {
if (asset.name === expectedFileName) { if (asset.name === expectedFileName) {
return (0, utils_1.downloadAndExtractJDK)(asset.browser_download_url); return (0, utils_1.downloadAndExtractJDK)(asset.browser_download_url);
} }
} }
throw new Error('Could not find GraalVM nightly build'); throw new Error('Could not find GraalVM dev build');
}); });
} }
exports.setUpGraalVMNightly = setUpGraalVMNightly; exports.setUpGraalVMDevBuild = setUpGraalVMDevBuild;
function setUpGraalVMRelease(version, javaVersion) { function setUpGraalVMRelease(version, javaVersion) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const graalVMIdentifier = determineGraalVMIdentifier(version, javaVersion); const graalVMIdentifier = determineGraalVMIdentifier(version, javaVersion);
@ -420,8 +420,8 @@ function run() {
case c.VERSION_LATEST: case c.VERSION_LATEST:
graalVMHome = yield graalvm.setUpGraalVMLatest(javaVersion); graalVMHome = yield graalvm.setUpGraalVMLatest(javaVersion);
break; break;
case c.VERSION_NIGHTLY: case c.VERSION_DEV:
graalVMHome = yield graalvm.setUpGraalVMNightly(javaVersion); graalVMHome = yield graalvm.setUpGraalVMDevBuild(javaVersion);
break; break;
case c.VERSION_TRUNK: case c.VERSION_TRUNK:
graalVMHome = yield (0, graalvm_trunk_1.setUpGraalVMTrunk)(javaVersion, components); graalVMHome = yield (0, graalvm_trunk_1.setUpGraalVMTrunk)(javaVersion, components);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -5,8 +5,8 @@ import {join} from 'path'
export const IS_MACOS = process.platform === 'darwin' export const IS_MACOS = process.platform === 'darwin'
export const IS_WINDOWS = process.platform === 'win32' export const IS_WINDOWS = process.platform === 'win32'
export const VERSION_DEV = 'dev'
export const VERSION_LATEST = 'latest' export const VERSION_LATEST = 'latest'
export const VERSION_NIGHTLY = 'nightly'
export const VERSION_TRUNK = 'trunk' export const VERSION_TRUNK = 'trunk'
export const GRAALVM_BASE = join(homedir(), '.graalvm') export const GRAALVM_BASE = join(homedir(), '.graalvm')

View File

@ -3,7 +3,7 @@ import {downloadAndExtractJDK, getLatestRelease} from './utils'
const GRAALVM_CE_DL_BASE = const GRAALVM_CE_DL_BASE =
'https://github.com/graalvm/graalvm-ce-builds/releases/download' 'https://github.com/graalvm/graalvm-ce-builds/releases/download'
const GRAALVM_REPO_NIGHTLY = 'graalvm-ce-dev-builds' const GRAALVM_REPO_DEV_BUILDS = 'graalvm-ce-dev-builds'
const GRAALVM_REPO_RELEASES = 'graalvm-ce-builds' const GRAALVM_REPO_RELEASES = 'graalvm-ce-builds'
const GRAALVM_TAG_PREFIX = 'vm-' const GRAALVM_TAG_PREFIX = 'vm-'
@ -20,18 +20,18 @@ export async function setUpGraalVMLatest(javaVersion: string): Promise<string> {
throw new Error(`Could not find latest GraalVM release: ${tag_name}`) throw new Error(`Could not find latest GraalVM release: ${tag_name}`)
} }
export async function setUpGraalVMNightly( export async function setUpGraalVMDevBuild(
javaVersion: string javaVersion: string
): Promise<string> { ): Promise<string> {
const latestNightly = await getLatestRelease(GRAALVM_REPO_NIGHTLY) const latestDevBuild = await getLatestRelease(GRAALVM_REPO_DEV_BUILDS)
const graalVMIdentifier = determineGraalVMIdentifier('dev', javaVersion) const graalVMIdentifier = determineGraalVMIdentifier('dev', javaVersion)
const expectedFileName = `${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}` const expectedFileName = `${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`
for (const asset of latestNightly.assets) { for (const asset of latestDevBuild.assets) {
if (asset.name === expectedFileName) { if (asset.name === expectedFileName) {
return downloadAndExtractJDK(asset.browser_download_url) return downloadAndExtractJDK(asset.browser_download_url)
} }
} }
throw new Error('Could not find GraalVM nightly build') throw new Error('Could not find GraalVM dev build')
} }
export async function setUpGraalVMRelease( export async function setUpGraalVMRelease(

View File

@ -30,8 +30,8 @@ async function run(): Promise<void> {
case c.VERSION_LATEST: case c.VERSION_LATEST:
graalVMHome = await graalvm.setUpGraalVMLatest(javaVersion) graalVMHome = await graalvm.setUpGraalVMLatest(javaVersion)
break break
case c.VERSION_NIGHTLY: case c.VERSION_DEV:
graalVMHome = await graalvm.setUpGraalVMNightly(javaVersion) graalVMHome = await graalvm.setUpGraalVMDevBuild(javaVersion)
break break
case c.VERSION_TRUNK: case c.VERSION_TRUNK:
graalVMHome = await setUpGraalVMTrunk(javaVersion, components) graalVMHome = await setUpGraalVMTrunk(javaVersion, components)