mirror of
https://github.com/actions/runner-images.git
synced 2026-01-06 18:19:54 +08:00
Merge branch 'main' into v-dimago/add-dotnet-core-5.0-macos
This commit is contained in:
@@ -30,7 +30,7 @@ npm cache clean --force
|
||||
yarn cache clean
|
||||
|
||||
# Clean up temporary directories
|
||||
rm -rf ~/utils ~/image-generation
|
||||
sudo rm -rf ~/utils ~/image-generation /tmp/*
|
||||
|
||||
# Erase all indexes and wait until the rebuilding process ends,
|
||||
# for now there is no way to get status of indexing process, it takes around 3 minutes to accomplish
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing aws...
|
||||
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
|
||||
sudo installer -pkg AWSCLIV2.pkg -target /
|
||||
rm -rf AWSCLIV2.pkg
|
||||
AWS_CLI_URL="https://awscli.amazonaws.com/AWSCLIV2.pkg"
|
||||
download_with_retries $AWS_CLI_URL "/tmp"
|
||||
sudo installer -pkg /tmp/AWSCLIV2.pkg -target /
|
||||
|
||||
echo Installing aws sam cli...
|
||||
brew tap aws/tap
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
AZCOPY_DOWNLOAD_URL="https://aka.ms/downloadazcopy-v10-mac"
|
||||
|
||||
wget -O "$HOME/azcopy.zip" "$AZCOPY_DOWNLOAD_URL"
|
||||
unzip azcopy.zip -d azcopy
|
||||
download_with_retries $AZCOPY_DOWNLOAD_URL "/tmp" "azcopy.zip"
|
||||
unzip /tmp/azcopy.zip -d azcopy
|
||||
AZCOPY_EXTRACTED=$(echo azcopy/azcopy*)
|
||||
cp "$AZCOPY_EXTRACTED/azcopy" "/usr/local/bin/azcopy"
|
||||
chmod +x "/usr/local/bin/azcopy"
|
||||
|
||||
@@ -4,4 +4,16 @@ echo "Installing GCC@8 using homebrew..."
|
||||
brew install gcc@8
|
||||
|
||||
echo "Installing GCC@9 using homebrew..."
|
||||
brew install gcc@9
|
||||
brew install gcc@9
|
||||
|
||||
# Known issue with brew that prevent installation of multiple formulas
|
||||
# https://github.com/Homebrew/brew/issues/9100
|
||||
echo "Applying workaround for the GCC"
|
||||
cellarPath=$(brew --cellar gcc@8)
|
||||
gccVersion=$(ls $cellarPath | head -n1)
|
||||
fullCellarPath=$cellarPath/$gccVersion
|
||||
ln -s $fullCellarPath/bin/c++-8 /usr/local/bin/c++-8
|
||||
ln -s $fullCellarPath/bin/cpp-8 /usr/local/bin/cpp-8
|
||||
ln -s $fullCellarPath/bin/g++-8 /usr/local/bin/g++-8
|
||||
ln -s $fullCellarPath/bin/gcc-8 /usr/local/bin/gcc-8
|
||||
ln -s $fullCellarPath/bin/gfortran-8 /usr/local/bin/gfortran-8
|
||||
@@ -11,7 +11,7 @@ if is_Less_Catalina; then
|
||||
echo Installing the latest Node JS 8...
|
||||
TMP_FILE=/tmp/node-v8.17.0.pkg
|
||||
NODEURL=https://nodejs.org/dist/latest-v8.x/node-v8.17.0.pkg
|
||||
curl "${NODEURL}" -o "${TMP_FILE}"
|
||||
download_with_retries $NODEURL "/tmp"
|
||||
sudo installer -pkg "${TMP_FILE}" -target /
|
||||
rm -rf "${TMP_FILE}"
|
||||
sudo chown -R $USER "/usr/local/lib/node_modules"
|
||||
@@ -27,8 +27,8 @@ if is_Less_Catalina; then
|
||||
npm install -g appcenter-cli@^1.0.0
|
||||
else
|
||||
# Install Node.JS 12 for macOS >= 10.15
|
||||
brew install node@12
|
||||
brew link node@12 --force
|
||||
brew install node@14
|
||||
brew link node@14 --force
|
||||
|
||||
for module in ${node_modules[@]}; do
|
||||
echo "Install $module"
|
||||
|
||||
@@ -7,7 +7,7 @@ installAzulJDK() {
|
||||
local TMP_FILE=/tmp/openjdk.dmg
|
||||
local TMP_MOUNT=`/usr/bin/mktemp -d /tmp/zulu.XXXX`
|
||||
# Download dmg
|
||||
curl "${URL}" -o "${TMP_FILE}"
|
||||
download_with_retries $URL "/tmp" "openjdk.dmg"
|
||||
# Attach dmg
|
||||
hdiutil attach "${TMP_FILE}" -mountpoint "${TMP_MOUNT}"
|
||||
# Install pkg
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
## File: pypy.sh
|
||||
## Desc: Installs PyPy
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
function InstallPyPy
|
||||
@@ -12,7 +13,7 @@ function InstallPyPy
|
||||
PACKAGE_TAR_NAME=$(echo $PACKAGE_URL | awk -F/ '{print $NF}')
|
||||
echo "Downloading tar archive '$PACKAGE_TAR_NAME' - '$PACKAGE_URL'"
|
||||
PACKAGE_TAR_TEMP_PATH="/tmp/$PACKAGE_TAR_NAME"
|
||||
wget -q -O $PACKAGE_TAR_TEMP_PATH $PACKAGE_URL
|
||||
download_with_retries $PACKAGE_URL "/tmp" "$PACKAGE_TAR_NAME"
|
||||
|
||||
echo "Expand '$PACKAGE_TAR_NAME' to the /tmp folder"
|
||||
tar xf $PACKAGE_TAR_TEMP_PATH -C /tmp
|
||||
|
||||
@@ -11,7 +11,8 @@ CARGO_HOME=$HOME/.cargo
|
||||
source $CARGO_HOME/env
|
||||
|
||||
echo Install common tools...
|
||||
rustup component add rustfmt clippy
|
||||
cargo install bindgen cbindgen cargo-audit cargo-outdated
|
||||
|
||||
echo Cleanup Cargo registry cached data...
|
||||
rm -rf $CARGO_HOME/registry/*
|
||||
rm -rf $CARGO_HOME/registry/*
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Get the latest Stack version..."
|
||||
StackRelease=$(curl -s "https://api.github.com/repos/commercialhaskell/stack/releases/latest")
|
||||
DownloadUrl=$(echo $StackRelease | jq -r '.assets[].browser_download_url | select(contains("osx-x86_64.tar.gz"))' | head -n 1)
|
||||
@@ -7,7 +9,7 @@ StackVersion=$(echo $StackRelease | jq -r '.name' | cut -c2-)
|
||||
StackArchive="/tmp/stack.tar.gz"
|
||||
|
||||
echo "Download stack version $StackVersion..."
|
||||
wget $DownloadUrl -O $StackArchive
|
||||
download_with_retries $DownloadUrl "/tmp" "stack.tar.gz"
|
||||
|
||||
StackToolcachePath="$AGENT_TOOLSDIRECTORY/stack/$StackVersion"
|
||||
DestinationPath="$StackToolcachePath/x64"
|
||||
|
||||
@@ -23,7 +23,7 @@ Function Install-Asset {
|
||||
$assetArchivePath = Join-Path $assetFolderPath $ReleaseAsset.filename
|
||||
|
||||
Write-Host "Download $($ReleaseAsset.filename) archive to the $assetFolderPath folder..."
|
||||
wget -P $assetFolderPath $ReleaseAsset.download_url --retry-connrefused --retry-on-http-error=429,500,503 --wait=30 --no-verbose
|
||||
Start-DownloadWithRetry -Url $ReleaseAsset.download_url -DownloadPath $assetFolderPath
|
||||
|
||||
Write-Host "Extract $($ReleaseAsset.filename) content..."
|
||||
tar -xzf $assetArchivePath -C $assetFolderPath
|
||||
|
||||
@@ -77,6 +77,7 @@ runFirstLaunch $DEFAULT_XCODE_VERSION
|
||||
if is_Catalina; then
|
||||
ln -sf /Applications/Xcode_11.2.1.app /Applications/Xcode_11.2.app
|
||||
ln -sf /Applications/Xcode_11.3.1.app /Applications/Xcode_11.3.app
|
||||
ln -sf /Applications/Xcode_11.4.1.app /Applications/Xcode_11.4.app
|
||||
fi
|
||||
|
||||
echo "Setting Xcode ${DEFAULT_XCODE_VERSION} as default"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Xamarin can clean their SDKs while updating to newer versions,
|
||||
# so we should be able to detect it during image generation
|
||||
downloadAndInstallPKG() {
|
||||
@@ -175,7 +177,7 @@ downloadNUnitConsole() {
|
||||
pushd $TMPMOUNT
|
||||
|
||||
sudo mkdir -p $NUNIT3_PATH
|
||||
sudo curl -L -o nunit3.zip $NUNIT3_LOCATION
|
||||
download_with_retries $NUNIT3_LOCATION "." "nunit3.zip"
|
||||
|
||||
echo "Installing NUnit 3..."
|
||||
sudo unzip nunit3.zip -d $NUNIT3_PATH
|
||||
@@ -191,8 +193,12 @@ installNuget() {
|
||||
echo "Installing nuget $NUGET_VERSION for Mono $MONO_VERSION"
|
||||
cd ${MONO_VERSIONS_PATH}/${MONO_VERSION}/lib/mono/nuget
|
||||
sudo mv nuget.exe nuget_old.exe
|
||||
sudo curl -L -o nuget.exe $NUGET_URL
|
||||
|
||||
pushd $TMPMOUNT
|
||||
download_with_retries $NUGET_URL "." "nuget.exe"
|
||||
sudo chmod a+x nuget.exe
|
||||
sudo mv nuget.exe ${MONO_VERSIONS_PATH}/${MONO_VERSION}/lib/mono/nuget
|
||||
popd
|
||||
}
|
||||
|
||||
createUWPShim() {
|
||||
|
||||
@@ -9,11 +9,6 @@ createXamarinProvisionatorSymlink() {
|
||||
FULL_VERSION="12.0.1"
|
||||
fi
|
||||
|
||||
# temporary trick for 12.1.1
|
||||
if [[ $XCODE_VERSION == "12.1" ]]; then
|
||||
FULL_VERSION="12.1.1"
|
||||
fi
|
||||
|
||||
if [ $FULL_VERSION != $XCODE_VERSION ]; then
|
||||
ln -sf "/Applications/Xcode_${XCODE_VERSION}.app" "/Applications/Xcode_${FULL_VERSION}.app"
|
||||
fi
|
||||
@@ -24,8 +19,6 @@ getXcodeVersionToInstall() {
|
||||
|
||||
if [[ $XCODE_VERSION == "12" ]]; then
|
||||
echo "12.0.1"
|
||||
elif [[ $XCODE_VERSION == "12.1" ]]; then
|
||||
echo "12.1.1 Release Candidate"
|
||||
elif [[ ! $XCODE_VERSION =~ "_beta" ]]; then
|
||||
echo "${XCODE_VERSION//_/ }"
|
||||
else
|
||||
@@ -62,7 +55,7 @@ runFirstLaunch() {
|
||||
}
|
||||
|
||||
setXcodeDeveloperDirVariables() {
|
||||
stable_xcode_versions=$(get_xcode_list_from_toolset | tr " " "\n" | grep -v "beta")
|
||||
stable_xcode_versions=$(get_xcode_list_from_toolset | tr " " "\n" | grep -v "beta" | grep -v "Release_Candidate")
|
||||
major_versions=($(echo ${stable_xcode_versions[@]} | tr " " "\n" | cut -d '.' -f 1 | uniq))
|
||||
for MAJOR_VERSION in "${major_versions[@]}"
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user