diff --git a/lib/setup-julia.js b/lib/setup-julia.js index 5fcbea87..42ebdd3c 100644 --- a/lib/setup-julia.js +++ b/lib/setup-julia.js @@ -78,11 +78,15 @@ function run() { core.addPath(path.join(juliaPath, 'bin')); // Set output core.setOutput('julia-bindir', path.join(juliaPath, 'bin')); - // Test if Julia has been installed - exec.exec('julia', ['--version']); - // If enabled, also show the full version info + // Test if Julia has been installed and print the version if (core.getInput('show-versioninfo') == 'true') { - exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']); + // If enabled, show the full version info + // --compile=min -O0 reduces the time from ~1.8-1.9s to ~0.8-0.9s + exec.exec('julia', ['--compile=min', '-O0', '-e', 'using InteractiveUtils; versioninfo()']); + } + else { + // Otherwise only print julia --version to save time + exec.exec('julia', ['--version']); } } catch (error) { diff --git a/package-lock.json b/package-lock.json index 262e8295..0592ddb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "setup-julia", - "version": "1.5.0", + "version": "1.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0896b9f1..4b887d7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-julia", - "version": "1.5.0", + "version": "1.5.1", "private": true, "description": "setup Julia action", "main": "lib/setup-julia.js", diff --git a/src/setup-julia.ts b/src/setup-julia.ts index 2c334bf3..08bab8db 100644 --- a/src/setup-julia.ts +++ b/src/setup-julia.ts @@ -73,13 +73,15 @@ async function run() { // Set output core.setOutput('julia-bindir', path.join(juliaPath, 'bin')) - - // Test if Julia has been installed - exec.exec('julia', ['--version']) - // If enabled, also show the full version info + // Test if Julia has been installed and print the version if (core.getInput('show-versioninfo') == 'true') { - exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']) + // If enabled, show the full version info + // --compile=min -O0 reduces the time from ~1.8-1.9s to ~0.8-0.9s + exec.exec('julia', ['--compile=min', '-O0', '-e', 'using InteractiveUtils; versioninfo()']) + } else { + // Otherwise only print julia --version to save time + exec.exec('julia', ['--version']) } } catch (error) { core.setFailed(error.message)