Fixed Xcodes installation (#304)
* Fixed Xcodes installation * Removed redundant execution lock from Cirrus runner configuration
This commit is contained in:
parent
3b47c8dfc6
commit
082799eb6f
|
|
@ -1,6 +1,5 @@
|
||||||
task:
|
task:
|
||||||
name: "Update Runner Image ($MACOS_VERSION)"
|
name: "Update Runner Image ($MACOS_VERSION)"
|
||||||
execution_lock: runner-image-update
|
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- MACOS_VERSION: sonoma
|
- MACOS_VERSION: sonoma
|
||||||
|
|
|
||||||
|
|
@ -76,9 +76,9 @@ locals {
|
||||||
type = "shell"
|
type = "shell"
|
||||||
inline = [
|
inline = [
|
||||||
"source ~/.zprofile",
|
"source ~/.zprofile",
|
||||||
"sudo /usr/local/bin/xcodes install ${version} --experimental-unxip --path /Users/admin/Downloads/Xcode_${version}.xip --select --empty-trash",
|
"sudo xcodes install ${version} --experimental-unxip --path /Users/admin/Downloads/Xcode_${version}.xip --select --empty-trash",
|
||||||
// get selected xcode path, strip /Contents/Developer and move to GitHub compatible locations
|
// get selected xcode path, strip /Contents/Developer and move to GitHub compatible locations
|
||||||
"INSTALLED_PATH=$(/usr/local/bin/xcodes select -p)",
|
"INSTALLED_PATH=$(xcodes select -p)",
|
||||||
"CONTENTS_DIR=$(dirname $INSTALLED_PATH)",
|
"CONTENTS_DIR=$(dirname $INSTALLED_PATH)",
|
||||||
"APP_DIR=$(dirname $CONTENTS_DIR)",
|
"APP_DIR=$(dirname $CONTENTS_DIR)",
|
||||||
"sudo mv $APP_DIR /Applications/Xcode_${version}.app",
|
"sudo mv $APP_DIR /Applications/Xcode_${version}.app",
|
||||||
|
|
@ -115,18 +115,6 @@ build {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compatibility with GitHub Actions Runner Images, where
|
|
||||||
# /usr/local/bin belongs to the default user. Also see [2].
|
|
||||||
#
|
|
||||||
# [1]: https://github.com/actions/runner-images/blob/6bbddd20d76d61606bea5a0133c950cc44c370d3/images/macos/scripts/build/configure-machine.sh#L96
|
|
||||||
# [2]: https://github.com/actions/runner-images/discussions/7607
|
|
||||||
provisioner "shell" {
|
|
||||||
inline = [
|
|
||||||
"sudo chown admin /usr/local/bin",
|
|
||||||
"/usr/local/bin/xcodes version",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
inline = [
|
inline = [
|
||||||
"source ~/.zprofile",
|
"source ~/.zprofile",
|
||||||
|
|
@ -149,11 +137,8 @@ build {
|
||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
inline = [
|
inline = [
|
||||||
"source ~/.zprofile",
|
"source ~/.zprofile",
|
||||||
"wget -q https://github.com/XcodesOrg/xcodes/releases/latest/download/xcodes.zip -O xcodes.zip",
|
"brew install xcodes",
|
||||||
"unzip -q xcodes.zip",
|
"xcodes version",
|
||||||
"mv xcodes /usr/local/bin/",
|
|
||||||
"rm xcodes.zip",
|
|
||||||
"/usr/local/bin/xcodes version",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -185,7 +170,7 @@ build {
|
||||||
content {
|
content {
|
||||||
inline = [
|
inline = [
|
||||||
"source ~/.zprofile",
|
"source ~/.zprofile",
|
||||||
"sudo /usr/local/bin/xcodes select '${var.xcode_version[2]}'",
|
"sudo xcodes select '${var.xcode_version[2]}'",
|
||||||
"xcodebuild -downloadAllPlatforms",
|
"xcodebuild -downloadAllPlatforms",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -197,7 +182,7 @@ build {
|
||||||
content {
|
content {
|
||||||
inline = [
|
inline = [
|
||||||
"source ~/.zprofile",
|
"source ~/.zprofile",
|
||||||
"sudo /usr/local/bin/xcodes select '${var.xcode_version[1]}'",
|
"sudo xcodes select '${var.xcode_version[1]}'",
|
||||||
"xcodebuild -downloadAllPlatforms",
|
"xcodebuild -downloadAllPlatforms",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -206,7 +191,7 @@ build {
|
||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
inline = [
|
inline = [
|
||||||
"source ~/.zprofile",
|
"source ~/.zprofile",
|
||||||
"sudo /usr/local/bin/xcodes select '${var.xcode_version[0]}'",
|
"sudo xcodes select '${var.xcode_version[0]}'",
|
||||||
"xcodebuild -downloadAllPlatforms",
|
"xcodebuild -downloadAllPlatforms",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -382,6 +367,18 @@ build {
|
||||||
pause_before = "60s"
|
pause_before = "60s"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Compatibility with GitHub Actions Runner Images, where
|
||||||
|
# /usr/local/bin belongs to the default user. Also see [2].
|
||||||
|
#
|
||||||
|
# [1]: https://github.com/actions/runner-images/blob/6bbddd20d76d61606bea5a0133c950cc44c370d3/images/macos/scripts/build/configure-machine.sh#L96
|
||||||
|
# [2]: https://github.com/actions/runner-images/discussions/7607
|
||||||
|
provisioner "shell" {
|
||||||
|
inline = [
|
||||||
|
"sudo chown admin /usr/local/bin",
|
||||||
|
"xcodes version",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
// Install setup-info-generator
|
// Install setup-info-generator
|
||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
inline = [
|
inline = [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue