mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 22:26:56 +00:00
Add julia (#476)
* Update packer configs to add julia * fix julia installation on ubuntu
This commit is contained in:
committed by
GitHub
parent
3145274036
commit
52d17cfc5d
@@ -23,17 +23,18 @@ function GetLatestJuliaRelease () {
|
||||
|
||||
function InstallJulia () {
|
||||
# Extract Major and Minor version from full version string
|
||||
juliaMajorAndMinorVersion="$(sed 's/\.[^.]*$//' <<< $1)"
|
||||
juliaMajorAndMinorVersion="$(cut -d. -f1,2 <<< $1)"
|
||||
juliaInstallationPath="/usr/local/julia$1"
|
||||
|
||||
curl -sL "https://julialang-s3.julialang.org/bin/linux/x64/$juliaMajorAndMinorVersion/julia-$1-linux-x86_64.tar.gz" -o "julia-$1-linux-x86_64.tar.gz"
|
||||
mkdir -p "/usr/local/julia$juliaMajorAndMinorVersion"
|
||||
tar -C "/usr/local/julia$juliaMajorAndMinorVersion" -xzf "julia-$1-linux-x86_64.tar.gz" --strip-components=1 julia
|
||||
mkdir -p "$juliaInstallationPath"
|
||||
tar -C "$juliaInstallationPath" -xzf "julia-$1-linux-x86_64.tar.gz" --strip-components=1
|
||||
rm "julia-$1-linux-x86_64.tar.gz"
|
||||
|
||||
# If this version of Julia is to be the default version,
|
||||
# symlink it into the path
|
||||
if [ "$2" = true ]; then
|
||||
ln -s "/usr/local/julia$juliaMajorAndMinorVersion/bin/julia" /usr/bin/julia
|
||||
ln -s "$juliaInstallationPath/bin/julia" /usr/bin/julia
|
||||
fi
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
@@ -49,7 +50,7 @@ function InstallJulia () {
|
||||
fi
|
||||
|
||||
# Verify output of julia --version
|
||||
if [ ! "$(/usr/local/julia"$juliaMajorAndMinorVersion"/bin/julia --version)" = "julia version $1" ]; then
|
||||
if [ ! "$($juliaInstallationPath/bin/julia --version)" = "julia version $1" ]; then
|
||||
echo "Julia was not installed correctly"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -160,6 +160,7 @@
|
||||
"{{template_dir}}/scripts/installers/1604/powershellcore.sh",
|
||||
"{{template_dir}}/scripts/installers/ruby.sh",
|
||||
"{{template_dir}}/scripts/installers/rust.sh",
|
||||
"{{template_dir}}/scripts/installers/julia.sh",
|
||||
"{{template_dir}}/scripts/installers/sbt.sh",
|
||||
"{{template_dir}}/scripts/installers/selenium.sh",
|
||||
"{{template_dir}}/scripts/installers/sphinx.sh",
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
"{{template_dir}}/scripts/installers/1804/powershellcore.sh",
|
||||
"{{template_dir}}/scripts/installers/ruby.sh",
|
||||
"{{template_dir}}/scripts/installers/rust.sh",
|
||||
"{{template_dir}}/scripts/installers/julia.sh",
|
||||
"{{template_dir}}/scripts/installers/sbt.sh",
|
||||
"{{template_dir}}/scripts/installers/selenium.sh",
|
||||
"{{template_dir}}/scripts/installers/sphinx.sh",
|
||||
|
||||
@@ -338,6 +338,12 @@
|
||||
"{{ template_dir }}/scripts/Installers/Install-Rust.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
"{{ template_dir }}/scripts/Installers/Install-Julia.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
@@ -657,6 +663,12 @@
|
||||
"{{ template_dir }}/scripts/Installers/Validate-Rust.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
"{{ template_dir }}/scripts/Installers/Validate-Julia.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
|
||||
@@ -307,6 +307,12 @@
|
||||
"{{ template_dir }}/scripts/Installers/Install-Rust.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
"{{ template_dir }}/scripts/Installers/Install-Julia.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
@@ -626,6 +632,12 @@
|
||||
"{{ template_dir }}/scripts/Installers/Validate-Rust.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
"{{ template_dir }}/scripts/Installers/Validate-Julia.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
|
||||
Reference in New Issue
Block a user