mirror of
https://github.com/actions/runner-images.git
synced 2026-01-04 09:13:33 +08:00
[ubuntu] Rename build scripts (#8866)
* [ubuntu] Rename build scripts * [ubuntu] Change reboot to inline shell * [ubuntu] Move disk space validation to pester tests * [ubuntu] Rename helper and tests files * [ubuntu] Changes to cleanup, post-deployment and r scripts
This commit is contained in:
committed by
GitHub
parent
410fd620be
commit
1bd9214f41
27
images/ubuntu/scripts/build/install-julia.sh
Normal file
27
images/ubuntu/scripts/build/install-julia.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: install-julia.sh
|
||||
## Desc: Install Julia and add to the path
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# get the latest julia version
|
||||
json=$(curl -fsSL "https://julialang-s3.julialang.org/bin/versions.json")
|
||||
julia_version=$(echo $json | jq -r '.[].files[] | select(.triplet=="x86_64-linux-gnu" and (.version | contains("-") | not)).version' | sort -V | tail -n1)
|
||||
|
||||
# download julia archive
|
||||
julia_tar_url=$(echo $json | jq -r ".[].files[].url | select(endswith(\"julia-${julia_version}-linux-x86_64.tar.gz\"))")
|
||||
julia_tar_name="julia-${julia_version}-linux-x86_64.tar.gz"
|
||||
download_with_retries $julia_tar_url "/tmp" "${julia_tar_name}"
|
||||
|
||||
# extract files and make symlink
|
||||
julia_tar_tmp="/tmp/${julia_tar_name}"
|
||||
julia_installation_path="/usr/local/julia${julia_version}"
|
||||
mkdir -p "${julia_installation_path}"
|
||||
tar -C "${julia_installation_path}" -xzf "${julia_tar_tmp}" --strip-components=1
|
||||
ln -s "${julia_installation_path}/bin/julia" /usr/bin/julia
|
||||
rm "${julia_tar_tmp}"
|
||||
|
||||
invoke_tests "Tools" "Julia"
|
||||
Reference in New Issue
Block a user