Skip Windows environment setup for dev builds.

This commit is contained in:
Fabio Niephaus 2023-02-13 10:07:39 +01:00
parent 76d605752b
commit 93d8fee7fa
No known key found for this signature in database
GPG Key ID: F21CF5275F31DFD6
2 changed files with 7 additions and 2 deletions

View File

@ -27,7 +27,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() setUpWindowsEnvironment(graalvmVersion)
} }
await setUpDependencies(components) await setUpDependencies(components)
if (enableNativeImageMusl) { if (enableNativeImageMusl) {

View File

@ -1,6 +1,7 @@
import * as core from '@actions/core' import * as core from '@actions/core'
import {execSync} from 'child_process' import {execSync} from 'child_process'
import {existsSync} from 'fs' import {existsSync} from 'fs'
import {VERSION_DEV} from './constants'
// Keep in sync with https://github.com/actions/virtual-environments // Keep in sync with https://github.com/actions/virtual-environments
const KNOWN_VISUAL_STUDIO_INSTALLATIONS = [ const KNOWN_VISUAL_STUDIO_INSTALLATIONS = [
@ -26,7 +27,11 @@ function findVcvarsallPath(): string {
throw new Error('Failed to find vcvarsall.bat') throw new Error('Failed to find vcvarsall.bat')
} }
export function setUpWindowsEnvironment(): void { export function setUpWindowsEnvironment(graalVMVersion: string): void {
if (graalVMVersion === VERSION_DEV) {
return // no longer required in dev builds
}
core.startGroup('Updating Windows environment...') core.startGroup('Updating Windows environment...')
const vcvarsallPath = findVcvarsallPath() const vcvarsallPath = findVcvarsallPath()