diff --git a/.ci/cirrus.xcode.yml b/.ci/cirrus.xcode.yml index 369b253..512f8ec 100644 --- a/.ci/cirrus.xcode.yml +++ b/.ci/cirrus.xcode.yml @@ -5,6 +5,7 @@ task: matrix: - MACOS_VERSION: tahoe XCODE_VERSION: 26-beta-6 + XCODE_COMPONENTS: "MetalToolchain" LATEST: true - MACOS_VERSION: sequoia XCODE_VERSION: 16.4 @@ -32,7 +33,7 @@ task: - tart pull ghcr.io/cirruslabs/macos-$MACOS_VERSION-base:latest build_xcode_script: - packer init templates/xcode.pkr.hcl - - packer build -var macos_version="$MACOS_VERSION" -var xcode_version="[\"$XCODE_VERSION\"]" templates/xcode.pkr.hcl + - packer build -var macos_version="$MACOS_VERSION" -var xcode_version="[\"$XCODE_VERSION\"]" -var xcode_components="[\"$XCODE_COMPONENTS\"]" templates/xcode.pkr.hcl push_script: | if [[ -z "$LATEST" ]] then diff --git a/templates/xcode.pkr.hcl b/templates/xcode.pkr.hcl index 1be7a03..a5976f3 100644 --- a/templates/xcode.pkr.hcl +++ b/templates/xcode.pkr.hcl @@ -20,6 +20,12 @@ variable "additional_ios_builds" { default = [] } +variable "xcode_components" { + type = list(string) + default = [] + description = "Additional Xcode components to download." +} + variable "expected_runtimes_file" { type = string default = "" @@ -194,6 +200,15 @@ build { ) } + dynamic "shell" { + inline = concat( + ["source ~/.zprofile"], + [ + for component in var.xcode_components : "xcodebuild -downloadComponent ${component}" + ] + ) + } + provisioner "shell" { inline = [ "source ~/.zprofile",