mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
* Disable exit on error temporary to implement retry logic based on exit code * Check HTTP response code and retry if it's not 200 * Make variables local to not interfere with other scripts Co-authored-by: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com>
22 lines
746 B
Bash
22 lines
746 B
Bash
#!/bin/bash -e
|
|
|
|
source $HELPER_SCRIPTS/install.sh
|
|
source $HELPER_SCRIPTS/etc-environment.sh
|
|
|
|
# Install GraalVM
|
|
GRAALVM_ROOT=/usr/local/graalvm
|
|
export GRAALVM_11_ROOT=$GRAALVM_ROOT/graalvm-ce-java11*
|
|
|
|
url=$(curl -s https://api.github.com/repos/graalvm/graalvm-ce-builds/releases/latest | jq -r '.assets[].browser_download_url | select(contains("graalvm-ce-java11-linux-amd64") and endswith("tar.gz"))')
|
|
download_with_retries "$url" "/tmp" "graalvm-archive.tar.gz"
|
|
mkdir $GRAALVM_ROOT
|
|
tar -xzf "/tmp/graalvm-archive.tar.gz" -C $GRAALVM_ROOT
|
|
|
|
# Set environment variable for GraalVM root
|
|
setEtcEnvironmentVariable "GRAALVM_11_ROOT" $GRAALVM_11_ROOT
|
|
|
|
# Install Native Image
|
|
$GRAALVM_11_ROOT/bin/gu install native-image
|
|
|
|
invoke_tests "Tools" "GraalVM"
|