Compare commits

...
Author SHA1 Message Date
Nikolay Edigaryev db3cc097ba Disable apsd daemon and wait before shutting down 2024-11-12 18:23:30 +01:00
fedor c8a1e808b6 Xcode 16.2 Beta 2 2024-11-06 10:50:07 -05:00
Fedor Korotkov 8c1f0c213f Release Sequoia IPSW
Fixes #192
2024-11-04 13:43:48 -05:00
Fedor Korotkov 9875d24c4b Added 15.1 and 15.0.1 2024-11-03 22:37:22 -05:00
fedor 8425f62a71 Update one runner image at a time
So while the second one is building runners can download the first one.
2024-11-02 09:49:05 -04:00
fedor 7ebaf88c48 Include {15.1,15.0.1} into runner 2024-11-01 11:51:50 -04:00
fedor 639b46cb2f Update sonoma-xcode:{15.1,15.0.1} 2024-11-01 11:26:11 -04:00
fedor 77cc104d6d Updated release cadence to highlight supported Xcode version. 2024-10-31 15:55:48 -04:00
fedor 159d4c1c36 Xcode 16.1 2024-10-30 10:19:34 -07:00
fedor 2a0a476e3b Sequoia 15.1 2024-10-28 09:19:43 -07:00
fedor 74040f6870 Sort Xcodes to always install the freshest first
Seems it's leading to things like:

> Unable to connect to simulator.
2024-10-27 08:42:58 -07:00
fedor 9f061dacb4 Sort Xcodes to always install the freshest first
Seems it's leading to things like:

> Unable to connect to simulator.
2024-10-27 08:38:03 -07:00
Fedor Korotkov f8fd129df6 Xcode 16.2 Beta 1 2024-10-24 09:14:43 -07:00
fedor 80bedb81db Xcode 16.1 RC 2024-10-21 17:14:35 -04:00
fedor 7692f27396 Sequoia 15.1 RC 2024-10-21 17:10:02 -04:00
fedor 2bd3a78831 Quotes 2024-10-21 09:59:00 -04:00
fedor 39e0ccf2e4 Fixed command 2024-10-21 08:55:41 -04:00
fedor e3cad7e8c2 Reverse Xcode installation order 2024-10-21 07:21:43 -04:00
fedor 47f36a33f8 Retry downloads 2024-10-20 16:19:19 -04:00
fedor c198ef9957 Removed ADDITIONAL_RUNTIMES 2024-10-20 16:16:20 -04:00
fedor d038ed85d2 no only_if 2024-10-20 13:05:03 -04:00
fedor da102cc5e6 Additional runtimes 2024-10-20 12:36:59 -04:00
fedor b0520dfd1d Fixed empty runtimes 2024-10-20 11:27:03 -04:00
fedor 37c77845c8 Refactored release scripts 2024-10-19 11:14:07 -04:00
fedor 9a16028831 No additional_runtimes 2024-10-15 14:42:06 -04:00
fedor cd817762c5 Xcode 16.1 Beta 3 2024-10-15 14:40:31 -04:00
fedor 32c59db145 No additional runtimes 2024-10-06 20:44:48 -04:00
fedor 8dcd824d76 Default for additional_runtimes 2024-10-05 20:27:36 -04:00
Fedor Korotkov 200bc65efb Update vanilla-sequoia.pkr.hcl 2024-10-05 20:26:00 -04:00
Nikolay Edigaryev 74aca70ef6 Send Slack alerts on build failures (#189)
* Send Slack alerts on build failures

* Only send Slack notifications for failed cron builds
2024-10-01 14:54:02 -04:00
Fedor Korotkov 1e710b24b9 Pre-install gnupg (#188)
Useful for doing manual encription/decryption
2024-10-01 10:42:25 -04:00
Fedor Korotkov 26c6575d1c Add additional runtimes (#186) 2024-09-26 06:21:40 -04:00
Fedor Korotkov 63e491fbf8 Fixed version 2024-09-24 10:39:24 -04:00
Fedor Korotkov 600cb89e35 Start building Sequoia images (#184)
Only base the runner images. We are not planning to build per Xcode images to reduce amount of variants to support.

Related to #183
2024-09-19 10:45:24 -04:00
fedor dbde34c6a8 Reapply "Sonoma 14.6.1 (#170)" (#179)
This reverts commit 760e04e340.
2024-09-18 17:55:42 -07:00
Fedor Korotkov ef6d97a77e Build more images (#178)
Build Sequoia 15.0 and 15.1 separately since 15.0 is RC and about ot be released and 15.1 is still in beta.

Plus added Xcode 16 RC to the big runner image. But since it's RC put it first in the list so it's not default.
2024-09-10 10:18:11 -04:00
Fedor Korotkov 760e04e340 Revert "Sonoma 14.6.1 (#170)" (#179) 2024-09-10 08:39:26 -04:00
Nikolay Edigaryev b863116992 macOS Sequoia 15.1 beta 3 (#175)
* macOS Sequoia 15.1 beta 3

* No need to disable Voice Over
2024-09-09 14:57:03 +04:00
Isaac Halvorson 444b21aba2 Use Keyboard navigation instead of Voice Over for System Settings navigation (#174)
* Enable Keyboard navigation setting instead of using Voice Over for System Settings

* Only use space bar to get past final setup screen

* Remove unnecessary setdisplaysleep and setcomputersleep usage
2024-09-09 11:58:39 +04:00
fedor 525f51a54e macOS 15 beta 8 2024-08-31 09:44:45 -04:00
fedor 5c7259d9a9 Sequoia 15 Beta 5
And build on Sonoma
2024-08-23 13:00:23 -04:00
Fedor Korotkov 24ff639c4d Update .cirrus.yml
Don't build runner on beta
2024-08-12 16:06:31 -04:00
Fedor Korotkov 0be36e7056 Update .cirrus.yml 2024-08-12 15:31:28 -04:00
Fedor Korotkov ed0b1e4c15 sequoia 15.1 beta 2 2024-08-12 15:30:03 -04:00
Fedor Korotkov 489255bec4 Sonoma 14.6.1 (#170) 2024-08-07 14:12:46 -04:00
fedor 92c70a2e79 Proper Tags 2024-07-30 15:22:35 -04:00
fedor 5de5e0997b Sonoma 14.6 and Sequoia 15.1 2024-07-30 15:21:21 -04:00
Fedor Korotkov 127683c285 Sequoia Beta 3 (#166) 2024-07-11 09:36:31 -04:00
leavesster 98a8ed97a4 Update README.md (#165) 2024-07-05 22:06:22 -04:00
Fedor Korotkov 3d76cfe25e Do not use Sequoia hosts
Fixes https://github.com/cirruslabs/tart/issues/851
2024-07-01 11:31:47 -04:00
11 changed files with 250 additions and 147 deletions
+19
View File
@@ -0,0 +1,19 @@
task:
name: "Update Base Images ($MACOS_VERSION)"
alias: update-base
matrix:
- env:
MACOS_VERSION: sonoma
- env:
MACOS_VERSION: sequoia
<<: *defaults
pull_vanilla_script:
- tart pull ghcr.io/cirruslabs/macos-$MACOS_VERSION-vanilla:latest
build_base_script:
- packer init templates/base.pkr.hcl
- packer build -var macos_version="$MACOS_VERSION" templates/base.pkr.hcl
push_base_script:
- tart push $MACOS_VERSION-base ghcr.io/cirruslabs/macos-$MACOS_VERSION-base:latest
always:
cleanup_script:
- tart delete $MACOS_VERSION-base
+23
View File
@@ -0,0 +1,23 @@
task:
name: "Release Xcode $CIRRUS_TAG ($MACOS_VERSION)"
matrix:
- env:
MACOS_VERSION: sonoma
- env:
MACOS_VERSION: sequoia
<<: *defaults
pull_base_script:
- tart pull ghcr.io/cirruslabs/macos-$MACOS_VERSION-base:latest
build_script:
- packer init templates/xcode.pkr.hcl
- packer build -var macos_version="$MACOS_VERSION" -var xcode_version="[\"$CIRRUS_TAG\"]" templates/xcode.pkr.hcl
push_script: |
if [[ $CIRRUS_TAG == *"beta"* ]]
then
tart push $MACOS_VERSION-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:$CIRRUS_TAG
else
tart push $MACOS_VERSION-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:latest
fi
always:
cleanup_script:
- tart delete $MACOS_VERSION-xcode:$CIRRUS_TAG || true
+27
View File
@@ -0,0 +1,27 @@
task:
name: "Update Runner Image ($MACOS_VERSION)"
execution_lock: runner-image-update
env:
matrix:
- MACOS_VERSION: sonoma
XCODE_VERSIONS: "16,15.4,15.3,15.2,15.1,\"15.0.1\""
DISK_SIZE: 350
- MACOS_VERSION: sequoia
XCODE_VERSIONS: "16.1,\"16.2-beta-2\",16,15.4"
DISK_SIZE: 300
<<: *defaults
pull_base_script:
- tart pull ghcr.io/cirruslabs/macos-$MACOS_VERSION-base:latest
init_xcode_script: packer init templates/xcode.pkr.hcl
build_xcode_script: |
packer build -var tag=runner -var disk_size=$DISK_SIZE \
-var disk_free_mb=100000 \
-var macos_version="$MACOS_VERSION" \
-var xcode_version="[$XCODE_VERSIONS]" \
-var additional_runtimes="[$ADDITIONAL_RUNTIMES]" \
templates/xcode.pkr.hcl
push_script: |
tart push "$MACOS_VERSION-xcode:runner" ghcr.io/cirruslabs/macos-runner:$MACOS_VERSION
always:
cleanup_script:
- tart delete "$MACOS_VERSION-xcode:runner"
+29
View File
@@ -0,0 +1,29 @@
task:
name: "Update Vanilla Sonoma Image"
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH && changesInclude("templates/vanilla-sonoma.pkr.hcl")
<<: *defaults
build_script:
- packer init templates/vanilla-sonoma.pkr.hcl
- packer build templates/vanilla-sonoma.pkr.hcl
disable_sip_script:
- packer build -var vm_name=sonoma-vanilla templates/disable-sip.pkr.hcl
push_script:
- tart push sonoma-vanilla ghcr.io/cirruslabs/macos-sonoma-vanilla:latest ghcr.io/cirruslabs/macos-sonoma-vanilla:14.6
always:
cleanup_script:
- tart delete sonoma-vanilla
task:
name: "Update Vanilla Sequoia Image"
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH && changesInclude("templates/vanilla-sequoia.pkr.hcl")
<<: *defaults
build_script:
- packer init templates/vanilla-sequoia.pkr.hcl
- packer build templates/vanilla-sequoia.pkr.hcl
disable_sip_script:
- packer build -var vm_name=sequoia-vanilla templates/disable-sip.pkr.hcl
push_script:
- tart push sequoia-vanilla ghcr.io/cirruslabs/macos-sequoia-vanilla:latest ghcr.io/cirruslabs/macos-sequoia-vanilla:15.1
always:
cleanup_script:
- tart delete sequoia-vanilla
+43
View File
@@ -0,0 +1,43 @@
task:
name: "Update Xcode Images ($MACOS_VERSION $XCODE_VERSION)"
depends_on: update-base
env:
matrix:
- MACOS_VERSION: sequoia
XCODE_VERSION: 16.1
LATEST: true
- MACOS_VERSION: sequoia
XCODE_VERSION: 16.2-beta-2
- MACOS_VERSION: sequoia
XCODE_VERSION: 16
- MACOS_VERSION: sequoia
XCODE_VERSION: 15.4
- MACOS_VERSION: sonoma
XCODE_VERSION: 16
LATEST: true
- MACOS_VERSION: sonoma
XCODE_VERSION: 15.4
- MACOS_VERSION: sonoma
XCODE_VERSION: 15.3
- MACOS_VERSION: sonoma
XCODE_VERSION: 15.2
- MACOS_VERSION: sonoma
XCODE_VERSION: 15.1
- MACOS_VERSION: sonoma
XCODE_VERSION: 15.0.1
<<: *defaults
pull_base_script:
- 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
push_script: |
if [[ -z "$LATEST" ]]
then
tart push "$MACOS_VERSION-xcode:$XCODE_VERSION" ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:$XCODE_VERSION
else
tart push "$MACOS_VERSION-xcode:$XCODE_VERSION" ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:$XCODE_VERSION ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:latest
fi
always:
cleanup_script:
- tart delete "$MACOS_VERSION-xcode:$XCODE_VERSION"
+44 -4
View File
@@ -1,7 +1,47 @@
load("cirrus", "env", "http", "fs")
load("github.com/cirrus-modules/graphql", "rerun_task_if_issue_in_logs")
def on_task_failed(ctx):
if ctx.payload.data.task.automaticReRun:
print("Task is already an automatic re-run! Won't even try to re-run it...")
return
rerun_task_if_issue_in_logs(ctx.payload.data.task.id, "The network connection was lost")
if ctx.payload.data.task.automaticReRun:
print("Task is already an automatic re-run! Won't even try to re-run it...")
return
rerun_task_if_issue_in_logs(ctx.payload.data.task.id, "The network connection was lost")
def on_build_failed(ctx):
# Only send Slack notifications for failed cron builds[1]
#
# [1]: https://cirrus-ci.org/guide/writing-tasks/#cron-builds
if "Cron" not in ctx.payload.data.build.changeMessageTitle:
return
resp = http.post("https://slack.com/api/chat.postMessage", headers={
"Content-Type": "application/json",
"Authorization": "Bearer " + env.get("SLACK_TOKEN"),
}, json_body={
"channel": "#image-updates",
"text": "Build <https://cirrus-ci.com/build/{build_id}|{build_id} (\"{change_message_title}\")> failed on branch \"{branch_name}\" in repository \"{repository_name}\".".format(
build_id=ctx.payload.data.build.id, change_message_title=ctx.payload.data.build.changeMessageTitle,
branch_name=ctx.payload.data.build.branch, repository_name=ctx.payload.data.repository.name),
})
if resp.status_code != 200:
fail("failed to post message to Slack: got unexpected HTTP {}".format(resp.status_code))
resp_json = resp.json()
if resp_json["ok"] != True:
fail("got error when posting message to Slack: {}".format(resp_json["error"]))
def main(ctx):
result = fs.read(".ci/cirrus.vanilla.yml")
if env.get("CIRRUS_TAG") != None:
result += fs.read(".ci/cirrus.release.yml")
if env.get("CIRRUS_CRON") == "monthly":
result += fs.read(".ci/cirrus.base.yml")
result += fs.read(".ci/cirrus.xcode.yml")
if env.get("CIRRUS_CRON") == "weekly":
result += fs.read(".ci/cirrus.runner.yml")
return result
-124
View File
@@ -19,127 +19,3 @@ defaults: &defaults
info_script:
- tart --version
- packer --version
task:
name: "Update Vanilla Sonoma Image"
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH && changesInclude("templates/vanilla-sonoma.pkr.hcl")
<<: *defaults
build_script:
- packer init templates/vanilla-sonoma.pkr.hcl
- packer build templates/vanilla-sonoma.pkr.hcl
disable_sip_script:
- packer build -var vm_name=sonoma-vanilla templates/disable-sip.pkr.hcl
push_script:
- tart push sonoma-vanilla ghcr.io/cirruslabs/macos-sonoma-vanilla:latest ghcr.io/cirruslabs/macos-sonoma-vanilla:14.5
always:
cleanup_script:
- tart delete sonoma-vanilla
task:
name: "Update Vanilla Sequoia Image"
persistent_worker:
labels:
name: dev-mini-experimental
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH && changesInclude("templates/vanilla-sequoia.pkr.hcl")
<<: *defaults
build_script:
- packer init templates/vanilla-sequoia.pkr.hcl
- packer build templates/vanilla-sequoia.pkr.hcl
disable_sip_script:
- packer build -var vm_name=sequoia-vanilla templates/disable-sip.pkr.hcl
push_script:
- tart push sequoia-vanilla ghcr.io/cirruslabs/macos-sequoia-vanilla:latest ghcr.io/cirruslabs/macos-sequoia-vanilla:15.0 ghcr.io/cirruslabs/macos-sequoia-vanilla:15.0-beta-2
always:
cleanup_script:
- tart delete sequoia-vanilla
task:
name: "Update Base Images ($MACOS_VERSION)"
alias: update-base
matrix:
- env:
MACOS_VERSION: sonoma
only_if: $CIRRUS_CRON == "monthly"
<<: *defaults
pull_vanilla_script:
- tart pull ghcr.io/cirruslabs/macos-$MACOS_VERSION-vanilla:latest
build_base_script:
- packer init templates/base.pkr.hcl
- packer build -var macos_version="$MACOS_VERSION" templates/base.pkr.hcl
push_base_script:
- tart push $MACOS_VERSION-base ghcr.io/cirruslabs/macos-$MACOS_VERSION-base:latest
always:
cleanup_script:
- tart delete $MACOS_VERSION-base
task:
name: "Update Xcode Images ($MACOS_VERSION $XCODE_VERSION)"
depends_on: update-base
only_if: $CIRRUS_CRON == "monthly" # Every first Saturday of a month at 14 UTC
env:
matrix:
- MACOS_VERSION: sonoma
XCODE_VERSION: 15.4
LATEST: true
- MACOS_VERSION: sonoma
XCODE_VERSION: 15.3
- MACOS_VERSION: sonoma
XCODE_VERSION: 15.2
<<: *defaults
pull_base_script:
- 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
push_script: |
if [[ -z "$LATEST" ]]
then
tart push "$MACOS_VERSION-xcode:$XCODE_VERSION" ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:$XCODE_VERSION
else
tart push "$MACOS_VERSION-xcode:$XCODE_VERSION" ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:$XCODE_VERSION ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:latest
fi
always:
cleanup_script:
- tart delete "$MACOS_VERSION-xcode:$XCODE_VERSION"
task:
name: "Update Runner Image ($MACOS_VERSION)"
env:
matrix:
- MACOS_VERSION: sonoma
XCODE_VERSIONS: 15.2,15.3,15.4
only_if: $CIRRUS_TAG != "" || $CIRRUS_CRON == "weekly" # Every Sunday at 14 UTC
<<: *defaults
pull_base_script:
- tart pull ghcr.io/cirruslabs/macos-$MACOS_VERSION-base:latest
build_xcode_script:
- packer init templates/xcode.pkr.hcl
- packer build -var tag=runner -var disk_size=250 -var disk_free_mb=100000 -var macos_version="$MACOS_VERSION" -var xcode_version="[$XCODE_VERSIONS]" templates/xcode.pkr.hcl
push_script: |
tart push "$MACOS_VERSION-xcode:runner" ghcr.io/cirruslabs/macos-runner:$MACOS_VERSION
always:
cleanup_script:
- tart delete "$MACOS_VERSION-xcode:runner"
task:
name: "Release Xcode $CIRRUS_TAG ($MACOS_VERSION)"
only_if: $CIRRUS_TAG != ""
matrix:
- env:
MACOS_VERSION: sonoma
<<: *defaults
pull_base_script:
- tart pull ghcr.io/cirruslabs/macos-$MACOS_VERSION-base:latest
build_script:
- packer init templates/xcode.pkr.hcl
- packer build -var macos_version="$MACOS_VERSION" -var xcode_version="[\"$CIRRUS_TAG\"]" templates/xcode.pkr.hcl
push_script: |
if [[ $CIRRUS_TAG == *"beta"* ]]
then
tart push $MACOS_VERSION-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:$CIRRUS_TAG
else
tart push $MACOS_VERSION-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-$MACOS_VERSION-xcode:latest
fi
always:
cleanup_script:
- tart delete $MACOS_VERSION-xcode:$CIRRUS_TAG || true
+9 -7
View File
@@ -1,21 +1,23 @@
## macOS Packer Templates for Tart
Repository with Packer templates to build macOS [Tart](https://tart.app/) virtual machines to use with [Cirrus Runners](https://cirrus-runners.app/),
Repository with Packer templates to build macOS [Tart](https://tart.run/) virtual machines to use with [Cirrus Runners](https://cirrus-runners.app/),
[Cirrus CI](https://cirrus-ci.org/guide/macOS/) or [any other automation](https://tart.run/integrations/cirrus-cli/).
The following image variants are currently available:
* `macos-{sequoia,sonoma}-base` image has only `brew` pre-installed and the latest version of `macOS` available
* `macos-{sequoia,sonoma}-xcode:N` image is based on `macos-{sequoia,sonoma}-base` image and has `Xcode N` with [`Flutter`](https://flutter.dev/) pre-installed
* `macos-runner:sonoma` image is a variant of `xcode:N` with 3 latest versions of `Xcode` pre-installed and [`xcodes` tool](https://github.com/XcodesOrg/xcodes) to switch between them.
* `macos-runner:{sequoia,sonoma}` image is a variant of `xcode:N` with several versions of `Xcode` pre-installed and [`xcodes` tool](https://github.com/XcodesOrg/xcodes) to switch between them.
See a full list of VMs available [here](https://github.com/orgs/cirruslabs/packages?tab=packages&q=macos-).
## Release Cadence
Once a new version of Xcode is released, we will initiate a GitHub release which will automatically build and push
a new version of the `macos-{sequoia,sonoma}-xcode:N` image as well as `macos-runner:sonoma`. This generally happens within 24 hours
of a release. Please watch this repository releases to get notified about new images.
a new version of the `macos-sequoia-xcode:N`. This generally happens within 24 hours of a release.
Please watch this repository releases to get notified about new images.
For an Xcode release which is non beta and not an RC `ghcr.io/cirruslabs/macos-runner:sequoia` image will also be updated.
## Update Cadence
@@ -23,8 +25,8 @@ Some of the images are regularly getting rebuild in order to update the pre-inst
monthly on the first Saturday of the month:
* `ghcr.io/cirruslabs/macos-{sequoia,sonoma}-base`
* `ghcr.io/cirruslabs/macos-sonoma-xcode:{16-beta,latest,15.4,15.3,15.2}`
* `ghcr.io/cirruslabs/macos-sequoia-xcode:{16-beta}`
* `ghcr.io/cirruslabs/macos-runner:sonoma` which is a superset of `ghcr.io/cirruslabs/macos-sonoma-xcode:{latest,16,15.4,15.3,15.2,15.1,15.0.1}`
* `ghcr.io/cirruslabs/macos-runner:sequoia` which is a superset of `ghcr.io/cirruslabs/macos-sequoia-xcode:{latest,16.1,16.2-beta-2,16,15.4}`
Note that `ghcr.io/cirruslabs/macos-runner:sonoma` is updated every Sunday and this image is [optimised for startup](https://cirrus-runners.app/blog/2024/04/11/optimizing-startup-time-of-cirrus-runners/)
Note that `ghcr.io/cirruslabs/macos-runner:{sequoia,sonoma}` are updated every Sunday and these images are [optimised for startup](https://cirrus-runners.app/blog/2024/04/11/optimizing-startup-time-of-cirrus-runners/)
on Cirrus Runners and Cirrus CI services.
+9 -8
View File
@@ -8,7 +8,7 @@ packer {
}
source "tart-cli" "tart" {
from_ipsw = "https://updates.cdn-apple.com/2024SummerSeed/fullrestores/062-22022/AB066FFB-B7FE-4132-83AC-E58A323805C1/UniversalMac_15.0_24A5279h_Restore.ipsw"
from_ipsw = "https://updates.cdn-apple.com/2024FallFCS/fullrestores/072-12302/3786987A-AD94-4BFB-81B8-56D3841CA81B/UniversalMac_15.1_24B2083_Restore.ipsw"
vm_name = "sequoia-vanilla"
cpu_count = 4
memory_gb = 8
@@ -62,9 +62,12 @@ source "tart-cli" "tart" {
# Choose Your Look
"<wait10s><leftShiftOn><tab><leftShiftOff><spacebar>",
# Welcome to Mac
"<wait10s><tab><spacebar>",
# Enable Voice Over
"<wait10s><leftAltOn><f5><leftAltOff><wait5s>v",
"<wait10s><spacebar>",
# Enable Keyboard navigation
# This is so that we can navigate the System Settings app using the keyboard
"<wait10s><leftAltOn><spacebar><leftAltOff>Terminal<enter>",
"<wait10s>defaults write NSGlobalDomain AppleKeyboardUIMode -int 3<enter>",
"<wait10s><leftAltOn>q<leftAltOff>",
# Now that the installation is done, open "System Settings"
"<wait10s><leftAltOn><spacebar><leftAltOff>System Settings<enter>",
# Navigate to "Sharing"
@@ -73,8 +76,8 @@ source "tart-cli" "tart" {
"<wait10s><tab><tab><tab><tab><tab><spacebar>",
# Navigate to "Remote Login" and enable it
"<wait10s><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><tab><spacebar>",
# Disable Voice Over
"<leftAltOn><f5><leftAltOff>",
# Quit System Settings
"<wait10s><leftAltOn>q<leftAltOff>",
]
// A (hopefully) temporary workaround for Virtualization.Framework's
@@ -99,9 +102,7 @@ build {
// Disable screensaver for admin user
"defaults -currentHost write com.apple.screensaver idleTime 0",
// Prevent the VM from sleeping
"sudo systemsetup -setdisplaysleep Off 2>/dev/null",
"sudo systemsetup -setsleep Off 2>/dev/null",
"sudo systemsetup -setcomputersleep Off 2>/dev/null",
// Launch Safari to populate the defaults
"/Applications/Safari.app/Contents/MacOS/Safari &",
"SAFARI_PID=$!",
+1 -1
View File
@@ -8,7 +8,7 @@ packer {
}
source "tart-cli" "tart" {
from_ipsw = "https://updates.cdn-apple.com/2024SpringFCS/fullrestores/062-01897/C874907B-9F82-4109-87EB-6B3C9BF1507D/UniversalMac_14.5_23F79_Restore.ipsw"
from_ipsw = "https://updates.cdn-apple.com/2024SummerFCS/fullrestores/052-69922/F5DA2B64-25EB-4370-9E89-FA5689859796/UniversalMac_14.6_23G80_Restore.ipsw"
vm_name = "sonoma-vanilla"
cpu_count = 4
memory_gb = 8
+46 -3
View File
@@ -15,6 +15,11 @@ variable "xcode_version" {
type = list(string)
}
variable "additional_runtimes" {
type = list(string)
default = []
}
variable "tag" {
type = string
default = ""
@@ -38,7 +43,7 @@ variable "android_sdk_tools_version" {
source "tart-cli" "tart" {
vm_base_name = "ghcr.io/cirruslabs/macos-${var.macos_version}-base:latest"
// use tag or the last element of the xcode_version list
vm_name = "${var.macos_version}-xcode:${var.tag != "" ? var.tag : var.xcode_version[length(var.xcode_version) - 1]}"
vm_name = "${var.macos_version}-xcode:${var.tag != "" ? var.tag : var.xcode_version[0]}"
cpu_count = 4
memory_gb = 8
disk_size_gb = var.disk_size
@@ -50,7 +55,7 @@ source "tart-cli" "tart" {
locals {
xcode_install_provisioners = [
for version in var.xcode_version : {
for version in reverse(sort(var.xcode_version)) : {
type = "shell"
inline = [
"source ~/.zprofile",
@@ -134,6 +139,22 @@ build {
}
}
provisioner "shell" {
inline = [
"source ~/.zprofile",
"sudo xcodes select '${var.xcode_version[0]}'",
]
}
provisioner "shell" {
inline = concat(
["source ~/.zprofile"],
[
for runtime in var.additional_runtimes : "sudo xcodes runtimes install ${runtime}"
]
)
}
provisioner "shell" {
inline = [
"source ~/.zprofile",
@@ -165,7 +186,8 @@ build {
inline = [
"source ~/.zprofile",
"brew install graphicsmagick imagemagick",
"brew install wix/brew/applesimutils"
"brew install wix/brew/applesimutils",
"brew install gnupg"
]
}
@@ -207,4 +229,25 @@ build {
"test -d /Users/runner"
]
}
# Disable apsd[1][2] daemon as it causes high CPU usage after boot
#
# [1]: https://iboysoft.com/wiki/apsd-mac.html
# [2]: https://discussions.apple.com/thread/4459153
provisioner "shell" {
inline = [
"sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.apsd.plist"
]
}
# Wait for the "update_dyld_sim_shared_cache" process[1][2] to finish
# to avoid wasting CPU cycles after boot
#
# [1]: https://apple.stackexchange.com/questions/412101/update-dyld-sim-shared-cache-is-taking-up-a-lot-of-memory
# [2]: https://stackoverflow.com/a/68394101/9316533
provisioner "shell" {
inline = [
"sleep 900"
]
}
}