mirror of
https://github.com/cirruslabs/macos-image-templates.git
synced 2026-09-30 03:42:04 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19a8271935 | ||
|
|
ba158f524c | ||
|
|
a34d6d3e51 | ||
|
|
59624221fe | ||
|
|
ac0d6efcf5 |
+19
-11
@@ -1,5 +1,5 @@
|
||||
task:
|
||||
name: "Update Base Image"
|
||||
name: "Update Images"
|
||||
only_if: $CIRRUS_CRON != ""
|
||||
persistent_worker:
|
||||
labels:
|
||||
@@ -11,14 +11,22 @@ task:
|
||||
info_script:
|
||||
- tart --version
|
||||
- packer --version
|
||||
build_script:
|
||||
env_script:
|
||||
- echo "XCODE_VERSION=$(cat variables.pkrvars.hcl | grep xcode_version | awk '{print $(NF)}' | tr -d '\"')" >> $CIRRUS_ENV
|
||||
build_base_script:
|
||||
- packer init templates/base.pkr.hcl
|
||||
- packer build -var-file="variables.pkrvars.hcl" templates/base.pkr.hcl
|
||||
push_script:
|
||||
- tart push ventura-base ghcr.io/cirruslabs/macos-ventura-base:latest
|
||||
build_xcode_script:
|
||||
- packer init templates/xcode.pkr.hcl
|
||||
- packer build -var-file="variables.pkrvars.hcl" templates/xcode.pkr.hcl
|
||||
push_base_script:
|
||||
- tart push sonoma-base ghcr.io/cirruslabs/macos-sonoma-base:latest
|
||||
push_xcode_script:
|
||||
- tart push sonoma-xcode:$XCODE_VERSION ghcr.io/cirruslabs/macos-sonoma-xcode:$XCODE_VERSION ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
always:
|
||||
cleanup_script:
|
||||
- tart delete ventura-base
|
||||
- tart delete sonoma-base || true
|
||||
- tart delete sonoma-xcode:$XCODE_VERSION || true
|
||||
|
||||
task:
|
||||
name: "Release Xcode $CIRRUS_TAG"
|
||||
@@ -34,19 +42,19 @@ task:
|
||||
- tart --version
|
||||
- packer --version
|
||||
pull_base_script:
|
||||
- tart pull ghcr.io/cirruslabs/macos-ventura-base:latest
|
||||
- tart clone ghcr.io/cirruslabs/macos-ventura-base:latest ventura-base
|
||||
- tart pull ghcr.io/cirruslabs/macos-sonoma-base:latest
|
||||
- tart clone ghcr.io/cirruslabs/macos-sonoma-base:latest sonoma-base
|
||||
build_script:
|
||||
- packer init templates/xcode.pkr.hcl
|
||||
- packer build -var-file="variables.pkrvars.hcl" -var xcode_version="$CIRRUS_TAG" templates/xcode.pkr.hcl
|
||||
push_script: |
|
||||
if [[ $CIRRUS_TAG == *"beta"* ]]
|
||||
then
|
||||
tart push ventura-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-ventura-xcode:$CIRRUS_TAG
|
||||
tart push sonoma-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-sonoma-xcode:$CIRRUS_TAG
|
||||
else
|
||||
tart push ventura-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-ventura-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-ventura-xcode:latest
|
||||
tart push sonoma-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-sonoma-xcode:$CIRRUS_TAG ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
||||
fi
|
||||
always:
|
||||
cleanup_script:
|
||||
- tart delete ventura-base || true
|
||||
- tart delete ventura-xcode:$CIRRUS_TAG || true
|
||||
- tart delete sonoma-base || true
|
||||
- tart delete sonoma-xcode:$CIRRUS_TAG || true
|
||||
|
||||
@@ -2,20 +2,14 @@
|
||||
|
||||
Repository with Packer templates to build [Tart VMs](https://github.com/cirruslabs/tart) to use with [Cirrus CI](https://cirrus-ci.org/guide/macOS/).
|
||||
|
||||
* `macos-{monterey,ventura}-vanilla` image has nothing pre-installed
|
||||
* `macos-{monterey,ventura}-base` image has only `brew` pre-installed
|
||||
* `macos-{monterey,ventura}-xcode:N` image is based on `macos-{monterey,ventura}-base` image and has `Xcode N` with [`Flutter`](https://flutter.dev/) pre-installed
|
||||
* `macos-{monterey,ventura,sonoma}-vanilla` image has nothing pre-installed
|
||||
* `macos-{monterey,ventura,sonoma}-base` image has only `brew` pre-installed
|
||||
* `macos-{monterey,ventura,sonoma}-xcode:N` image is based on `macos-{monterey,ventura}-base` image and has `Xcode N` with [`Flutter`](https://flutter.dev/) pre-installed
|
||||
|
||||
See a full list of VMs available on Cirrus CI [here](https://github.com/orgs/cirruslabs/packages?tab=packages&q=macos-).
|
||||
|
||||
## Building Vanilla Image
|
||||
|
||||
To build `macos-ventura-vanilla`:
|
||||
|
||||
```bash
|
||||
packer build templates/vanilla-ventura.pkr.hcl
|
||||
```
|
||||
|
||||
To build `macos-sonoma-vanilla`:
|
||||
|
||||
```bash
|
||||
@@ -25,7 +19,7 @@ packer build templates/vanilla-sonoma.pkr.hcl
|
||||
Optionally, SIP can be disabled for each image by running the following commands:
|
||||
|
||||
```bash
|
||||
packer build -var vm_name=ventura-vanilla templates/disable-sip.pkr.hcl
|
||||
packer build -var vm_name=sonoma-vanilla templates/disable-sip.pkr.hcl
|
||||
```
|
||||
|
||||
## Building Base Image
|
||||
|
||||
@@ -8,12 +8,7 @@ packer {
|
||||
}
|
||||
|
||||
source "tart-cli" "tart" {
|
||||
# Currently macOS 14 (Sonoma) can only be obtained via the following links:
|
||||
# unauthenticated[1] and authenticated[2].
|
||||
#
|
||||
# [1]: https://updates.cdn-apple.com/2023SummerSeed/fullrestores/042-13887/3B4075C1-B695-49EA-82D9-4B720699D341/UniversalMac_14.0_23A5286i_Restore.ipsw
|
||||
# [2]: https://download.developer.apple.com/WWDC_2023/macOS_14_Beta_Restore_Images/UniversalMac_14.0_23A5286i_Restore.ipsw
|
||||
from_ipsw = "https://updates.cdn-apple.com/2023SummerSeed/fullrestores/042-13887/3B4075C1-B695-49EA-82D9-4B720699D341/UniversalMac_14.0_23A5286i_Restore.ipsw"
|
||||
from_ipsw = "https://updates.cdn-apple.com/2023FallFCS/fullrestores/002-81996/596571C1-9856-4BB3-B5BF-B5A48F4B406E/UniversalMac_14.0_23A339_Restore.ipsw"
|
||||
vm_name = "sonoma-vanilla"
|
||||
cpu_count = 4
|
||||
memory_gb = 8
|
||||
|
||||
@@ -10,7 +10,7 @@ packer {
|
||||
source "tart-cli" "tart" {
|
||||
# You can find macOS IPSW URLs on various websites like https://ipsw.me/
|
||||
# and https://www.theiphonewiki.com/wiki/Beta_Firmware/Mac/13.x
|
||||
from_ipsw = "https://updates.cdn-apple.com/2023SpringFCS/fullrestores/032-84884/F97A22EE-9B5E-4FD5-94C1-B39DCEE8D80F/UniversalMac_13.4_22F66_Restore.ipsw"
|
||||
from_ipsw = "https://updates.cdn-apple.com/2023SummerFCS/fullrestores/042-25658/2D6BE8DB-5549-4F85-8C54-39FC23BABC68/UniversalMac_13.5.1_22G90_Restore.ipsw"
|
||||
vm_name = "ventura-vanilla"
|
||||
cpu_count = 4
|
||||
memory_gb = 8
|
||||
@@ -115,6 +115,7 @@ build {
|
||||
// Note that this only works if the user is logged-in,
|
||||
// i.e. not on login screen.
|
||||
"sysadminctl -screenLock off -password admin",
|
||||
"defaults -currentHost write com.apple.screensaver idleTime 0"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
macos_version = "ventura"
|
||||
gha_version = "2.307.1"
|
||||
xcode_version = "14.3.1"
|
||||
macos_version = "sonoma"
|
||||
gha_version = "2.309.0"
|
||||
xcode_version = "15"
|
||||
|
||||
Reference in New Issue
Block a user