mirror of
https://github.com/actions/runner-images.git
synced 2026-01-06 18:19:54 +08:00
Merge branch 'main' of https://github.com/actions/virtual-environments into v-malob/xcode
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo Installing aws...
|
||||
brew install awscli
|
||||
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
|
||||
sudo installer -pkg AWSCLIV2.pkg -target /
|
||||
rm -rf AWSCLIV2.pkg
|
||||
|
||||
echo Installing aws sam cli...
|
||||
brew tap aws/tap
|
||||
|
||||
@@ -8,11 +8,6 @@ export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
|
||||
echo Installing OpenSSL...
|
||||
/usr/local/bin/brew install openssl
|
||||
|
||||
if is_BigSur; then
|
||||
ln -sf $(brew --prefix openssl)/bin/openssl /usr/local/bin/openssl
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Install OpenSSL 1.0.2t
|
||||
# https://www.openssl.org/policies/releasestrat.html - Version 1.0.2 will be supported until 2019-12-31 (LTS)
|
||||
# To preserve backward compatibility with ruby-toolcache
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
## Desc: Install toolset
|
||||
################################################################################
|
||||
|
||||
Import-Module "~/image-generation/helpers/Common.Helpers.psm1"
|
||||
|
||||
Function Get-ToolcacheFromToolset {
|
||||
$toolsetPath = Join-Path $env:HOME "image-generation" "toolset.json"
|
||||
$toolsetJson = Get-Content -Raw $toolsetPath | ConvertFrom-Json
|
||||
@@ -38,7 +40,7 @@ $tools = Get-ToolcacheFromToolset | Where-Object {$ToolsToInstall -contains $_.
|
||||
|
||||
foreach ($tool in $tools) {
|
||||
# Get versions manifest for current tool
|
||||
$assets = Invoke-RestMethod $tool.url
|
||||
$assets = Invoke-RestMethodWithRetry -Url $tool.url
|
||||
|
||||
# Get github release asset for each version
|
||||
foreach ($version in $tool.versions) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
|
||||
is_clt_installed() {
|
||||
clt_path=`xcode-select -p 2>&1`
|
||||
@@ -10,8 +11,15 @@ install_clt() {
|
||||
# This temporary file prompts the 'softwareupdate' utility to list the Command Line Tools
|
||||
clt_placeholder="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress"
|
||||
sudo touch $clt_placeholder
|
||||
# The only working tools for Big Sur are 12.2
|
||||
if is_Less_BigSur; then
|
||||
cltPattern="Command Line Tools"
|
||||
else
|
||||
cltPattern="Command Line Tools.*Xcode-12.2"
|
||||
fi
|
||||
|
||||
clt_label_command="/usr/sbin/softwareupdate -l |
|
||||
grep -B 1 -E 'Command Line Tools' |
|
||||
grep -B 1 -E '${cltPattern}' |
|
||||
awk -F'*' '/^ *\\*/ {print \$2}' |
|
||||
sed -e 's/^ *Label: //' -e 's/^ *//' |
|
||||
sort -V |
|
||||
|
||||
@@ -12,7 +12,7 @@ download_with_retries() {
|
||||
--wait 30 \
|
||||
--retry-connrefused \
|
||||
--retry-on-host-error \
|
||||
--retry-on-http-error=429,500,502,503 \
|
||||
--retry-on-http-error=404,429,500,502,503 \
|
||||
--no-verbose
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
|
||||
@@ -84,7 +84,9 @@ extractXcodeXip() {
|
||||
local WORKING_DIR="$1"
|
||||
local XCODE_XIP=$(find "$WORKING_DIR" -name "Xcode_*.xip" | head -n1)
|
||||
|
||||
open -W $XCODE_XIP
|
||||
pushd $WORKING_DIR
|
||||
xip -x "${XCODE_XIP}"
|
||||
popd
|
||||
|
||||
if [[ -d "${WORKING_DIR}/Xcode-beta.app" ]]; then
|
||||
mv -f "${WORKING_DIR}/Xcode-beta.app" "${WORKING_DIR}/Xcode.app"
|
||||
|
||||
Reference in New Issue
Block a user