mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-17 21:46:54 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94873876a2 |
@@ -1,6 +1,5 @@
|
|||||||
# setup-julia Action
|
# setup-julia Action
|
||||||
|
|
||||||
[](https://securitylab.github.com/tools/codeql)
|
|
||||||
[](https://dependabot.com)
|
[](https://dependabot.com)
|
||||||
|
|
||||||
This action sets up a Julia environment for use in actions by downloading a specified version of Julia and adding it to PATH.
|
This action sets up a Julia environment for use in actions by downloading a specified version of Julia and adding it to PATH.
|
||||||
|
|||||||
12
dist/index.js
vendored
12
dist/index.js
vendored
@@ -4029,15 +4029,11 @@ 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 and print the version
|
// Test if Julia has been installed
|
||||||
|
exec.exec('julia', ['--version']);
|
||||||
|
// If enabled, also show the full version info
|
||||||
if (core.getInput('show-versioninfo') == 'true') {
|
if (core.getInput('show-versioninfo') == 'true') {
|
||||||
// If enabled, show the full version info
|
exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']);
|
||||||
// --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) {
|
||||||
|
|||||||
12
lib/setup-julia.js
generated
12
lib/setup-julia.js
generated
@@ -78,15 +78,11 @@ 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 and print the version
|
// Test if Julia has been installed
|
||||||
|
exec.exec('julia', ['--version']);
|
||||||
|
// If enabled, also show the full version info
|
||||||
if (core.getInput('show-versioninfo') == 'true') {
|
if (core.getInput('show-versioninfo') == 'true') {
|
||||||
// If enabled, show the full version info
|
exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()']);
|
||||||
// --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
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-julia",
|
"name": "setup-julia",
|
||||||
"version": "1.5.1",
|
"version": "1.5.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-julia",
|
"name": "setup-julia",
|
||||||
"version": "1.5.1",
|
"version": "1.5.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup Julia action",
|
"description": "setup Julia action",
|
||||||
"main": "lib/setup-julia.js",
|
"main": "lib/setup-julia.js",
|
||||||
|
|||||||
@@ -74,14 +74,12 @@ 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 and print the version
|
// Test if Julia has been installed
|
||||||
|
exec.exec('julia', ['--version'])
|
||||||
|
|
||||||
|
// If enabled, also show the full version info
|
||||||
if (core.getInput('show-versioninfo') == 'true') {
|
if (core.getInput('show-versioninfo') == 'true') {
|
||||||
// If enabled, show the full version info
|
exec.exec('julia', ['-e', 'using InteractiveUtils; versioninfo()'])
|
||||||
// --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)
|
||||||
|
|||||||
Reference in New Issue
Block a user