mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-02-23 12:20:10 +08:00
parent
a2b35c9a1c
commit
7652cc43b3
13
dist/main/index.js
generated
vendored
13
dist/main/index.js
generated
vendored
@ -94269,7 +94269,7 @@ function run() {
|
|||||||
const enableCheckForUpdates = core.getInput(c.INPUT_CHECK_FOR_UPDATES) === 'true';
|
const enableCheckForUpdates = core.getInput(c.INPUT_CHECK_FOR_UPDATES) === 'true';
|
||||||
const enableNativeImageMusl = core.getInput(c.INPUT_NI_MUSL) === 'true';
|
const enableNativeImageMusl = core.getInput(c.INPUT_NI_MUSL) === 'true';
|
||||||
if (c.IS_WINDOWS) {
|
if (c.IS_WINDOWS) {
|
||||||
(0, msvc_1.setUpWindowsEnvironment)(graalVMVersion);
|
(0, msvc_1.setUpWindowsEnvironment)(javaVersion, graalVMVersion);
|
||||||
}
|
}
|
||||||
yield (0, dependencies_1.setUpDependencies)(components);
|
yield (0, dependencies_1.setUpDependencies)(components);
|
||||||
if (enableNativeImageMusl) {
|
if (enableNativeImageMusl) {
|
||||||
@ -94565,6 +94565,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.setUpWindowsEnvironment = void 0;
|
exports.setUpWindowsEnvironment = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
|
const semver = __importStar(__nccwpck_require__(1383));
|
||||||
const child_process_1 = __nccwpck_require__(2081);
|
const child_process_1 = __nccwpck_require__(2081);
|
||||||
const fs_1 = __nccwpck_require__(7147);
|
const fs_1 = __nccwpck_require__(7147);
|
||||||
const constants_1 = __nccwpck_require__(9042);
|
const constants_1 = __nccwpck_require__(9042);
|
||||||
@ -94588,10 +94589,16 @@ function findVcvarsallPath() {
|
|||||||
}
|
}
|
||||||
throw new Error('Failed to find vcvarsall.bat');
|
throw new Error('Failed to find vcvarsall.bat');
|
||||||
}
|
}
|
||||||
function setUpWindowsEnvironment(graalVMVersion) {
|
function setUpWindowsEnvironment(javaVersion, graalVMVersion) {
|
||||||
if (graalVMVersion === constants_1.VERSION_DEV) {
|
if (javaVersion === javaVersion || graalVMVersion === constants_1.VERSION_DEV) {
|
||||||
return; // no longer required in dev builds
|
return; // no longer required in dev builds
|
||||||
}
|
}
|
||||||
|
const javaVersionSemVer = semver.coerce(javaVersion);
|
||||||
|
if (javaVersionSemVer &&
|
||||||
|
semver.valid(javaVersionSemVer) &&
|
||||||
|
semver.gte(javaVersionSemVer, '18.0.0')) {
|
||||||
|
return; // no longer required in GraalVM for JDK 17 and later. JDK 17 builds from 22.3 still need this, so skip 17.X.X
|
||||||
|
}
|
||||||
core.startGroup('Updating Windows environment...');
|
core.startGroup('Updating Windows environment...');
|
||||||
const vcvarsallPath = findVcvarsallPath();
|
const vcvarsallPath = findVcvarsallPath();
|
||||||
core.debug(`Calling "${vcvarsallPath}"...`);
|
core.debug(`Calling "${vcvarsallPath}"...`);
|
||||||
|
@ -31,7 +31,7 @@ async function run(): Promise<void> {
|
|||||||
const enableNativeImageMusl = core.getInput(c.INPUT_NI_MUSL) === 'true'
|
const enableNativeImageMusl = core.getInput(c.INPUT_NI_MUSL) === 'true'
|
||||||
|
|
||||||
if (c.IS_WINDOWS) {
|
if (c.IS_WINDOWS) {
|
||||||
setUpWindowsEnvironment(graalVMVersion)
|
setUpWindowsEnvironment(javaVersion, graalVMVersion)
|
||||||
}
|
}
|
||||||
await setUpDependencies(components)
|
await setUpDependencies(components)
|
||||||
if (enableNativeImageMusl) {
|
if (enableNativeImageMusl) {
|
||||||
|
16
src/msvc.ts
16
src/msvc.ts
@ -1,4 +1,5 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
|
import * as semver from 'semver'
|
||||||
import {execSync} from 'child_process'
|
import {execSync} from 'child_process'
|
||||||
import {existsSync} from 'fs'
|
import {existsSync} from 'fs'
|
||||||
import {VERSION_DEV} from './constants'
|
import {VERSION_DEV} from './constants'
|
||||||
@ -27,10 +28,21 @@ function findVcvarsallPath(): string {
|
|||||||
throw new Error('Failed to find vcvarsall.bat')
|
throw new Error('Failed to find vcvarsall.bat')
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setUpWindowsEnvironment(graalVMVersion: string): void {
|
export function setUpWindowsEnvironment(
|
||||||
if (graalVMVersion === VERSION_DEV) {
|
javaVersion: string,
|
||||||
|
graalVMVersion: string
|
||||||
|
): void {
|
||||||
|
if (javaVersion === javaVersion || graalVMVersion === VERSION_DEV) {
|
||||||
return // no longer required in dev builds
|
return // no longer required in dev builds
|
||||||
}
|
}
|
||||||
|
const javaVersionSemVer = semver.coerce(javaVersion)
|
||||||
|
if (
|
||||||
|
javaVersionSemVer &&
|
||||||
|
semver.valid(javaVersionSemVer) &&
|
||||||
|
semver.gte(javaVersionSemVer, '18.0.0')
|
||||||
|
) {
|
||||||
|
return // no longer required in GraalVM for JDK 17 and later. JDK 17 builds from 22.3 still need this, so skip 17.X.X
|
||||||
|
}
|
||||||
|
|
||||||
core.startGroup('Updating Windows environment...')
|
core.startGroup('Updating Windows environment...')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user