Compare commits

..

3 Commits

Author SHA1 Message Date
Sascha Mann
e18229af6a Add production dependencies & build 2021-01-03 14:24:47 +01:00
Sascha Mann
66addd1b2f Don't print version twice if show-versioninfo is enabled 2021-01-03 13:42:52 +01:00
Sascha Mann
3ff0592a25 Use --compile=min -O0 flags for versioninfo
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
2021-01-03 13:42:52 +01:00
9 changed files with 4821 additions and 17 deletions

View File

@@ -33,7 +33,3 @@ jobs:
arch: ${{ matrix.julia-arch }} arch: ${{ matrix.julia-arch }}
show-versioninfo: 'true' show-versioninfo: 'true'
- run: julia --version - run: julia --version
- run: time julia --compile=min -O0 -e 'using InteractiveUtils; versioninfo()'
shell: bash
- run: time julia -e 'using InteractiveUtils; versioninfo()'
shell: bash

2
.gitignore vendored
View File

@@ -1,3 +1,3 @@
node_modules/ node_modules/
__tests__/runner/* __tests__/runner/*
dist/ !dist/

2
bin

Submodule bin updated: 31b4b500a3...9ceca17c9c

4802
dist/index.js vendored Normal file

File diff suppressed because it is too large Load Diff

BIN
dist/unzip vendored Normal file

Binary file not shown.

12
lib/setup-julia.js generated
View File

@@ -78,11 +78,15 @@ function run() {
core.addPath(path.join(juliaPath, 'bin')); core.addPath(path.join(juliaPath, 'bin'));
// Set output // Set output
core.setOutput('julia-bindir', path.join(juliaPath, 'bin')); core.setOutput('julia-bindir', path.join(juliaPath, 'bin'));
// Test if Julia has been installed // Test if Julia has been installed and print the version
exec.exec('julia', ['--version']);
// If enabled, also show the full version info
if (core.getInput('show-versioninfo') == 'true') { 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) { catch (error) {

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "setup-julia", "name": "setup-julia",
"version": "1.5.0", "version": "1.5.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "setup-julia", "name": "setup-julia",
"version": "1.5.0", "version": "1.5.1",
"private": true, "private": true,
"description": "setup Julia action", "description": "setup Julia action",
"main": "lib/setup-julia.js", "main": "lib/setup-julia.js",

View File

@@ -74,12 +74,14 @@ async function run() {
// Set output // Set output
core.setOutput('julia-bindir', path.join(juliaPath, 'bin')) core.setOutput('julia-bindir', path.join(juliaPath, 'bin'))
// Test if Julia has been installed // Test if Julia has been installed and print the version
exec.exec('julia', ['--version'])
// If enabled, also show the full version info
if (core.getInput('show-versioninfo') == 'true') { 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) { } catch (error) {
core.setFailed(error.message) core.setFailed(error.message)