Compare commits

..
35 Commits
Author SHA1 Message Date
Nikolay Edigaryev 85b6aae17f Hide useless systemsetup errors and avoid scary Safari kill error 2023-12-14 19:49:50 +04:00
fedor 67a57c3064 Xcode 15.1 2023-12-12 21:56:50 +01:00
fedor fabd89cead Fixed tag 2023-12-12 21:56:10 +01:00
Fedor Korotkov b19d3fa66c Use alias for ECR pushes 2023-11-27 12:51:22 -05:00
Fedor Korotkov 3f1850ad07 ECR chunked push 2023-11-27 12:50:17 -05:00
Fedor Korotkov 4b7ac1f76f Increased timeout 2023-11-10 13:20:59 -05:00
Fedor Korotkov 98b522dbfa Push images to public ECR (#103)
* Push images to public ECR

Related to https://github.com/cirruslabs/tart/discussions/652

* Use the default alias until we get the custom one
2023-11-10 09:28:47 -05:00
fedor 41b20ab533 Revert "Pin version of activesupport (#101)"
This reverts commit 6555932569.
2023-11-06 11:22:57 -05:00
Fedor Korotkov b28936faa2 Xcode 15.0.1 2023-11-06 11:21:47 -05:00
fedor 3e3e6818f3 Sonoma 14.1 2023-10-25 16:10:45 -04:00
Fedor Korotkov 47695a9abd Runner 2.311.0 2023-10-23 16:30:43 -04:00
Fedor Korotkov 6555932569 Pin version of activesupport (#101)
* Pin version of `activesupport`

Fixes #100 while https://github.com/CocoaPods/CocoaPods/issues/12081 is not released.

* Fixed installation
2023-10-10 07:56:40 -04:00
Fedor Korotkov 4513f2adad GHA Runner 2.310.0 2023-10-09 09:51:05 -04:00
Fedor Korotkov 0a4f436302 Update README.md 2023-10-05 07:03:08 -04:00
Rui Marinho 277b13fb59 macOS 13.5.2 (#97) 2023-09-27 12:34:46 -04:00
Fedor Korotkov 19a8271935 Switch to Sonoma (#98)
Use RC and update all the scripts
2023-09-20 10:59:13 -04:00
fedor ba158f524c Removed quotes from Xcode version 2023-09-04 00:24:18 +02:00
fedor a34d6d3e51 macOS 13.5.1 2023-09-04 00:11:48 +02:00
Fedor Korotkov 59624221fe Update Xcode Image (#94)
During the monthly cron update. Fixes #93
2023-08-14 11:22:36 -04:00
Fedor Korotkov ac0d6efcf5 Update variables.pkrvars.hcl 2023-08-14 09:29:17 -04:00
Fedor Korotkov 4e75d95247 Update variables.pkrvars.hcl 2023-07-25 09:19:13 -04:00
fedor 7fcf10afd6 Build sonoma 2023-07-13 06:46:47 -04:00
fedor 0f7f741d45 Use latest 2023-07-13 06:46:17 -04:00
fedor f0e06a7c5e Bump the GHA runner 2023-07-13 06:46:09 -04:00
Melvin GundlachandMelvin Gundlach 21e5a3eb86 Update vanilla-sonoma to Beta 3 Update (#91)
Co-authored-by: Melvin Gundlach <mgundlach@it-economics.de>
2023-07-12 07:46:12 -04:00
Melvin GundlachandMelvin Gundlach a2d379b619 Update vanilla-sonoma to Beta 3 (#90)
Co-authored-by: Melvin Gundlach <mgundlach@it-economics.de>
2023-07-11 07:50:09 -04:00
Grigory Entin 5d00757016 Disabled screensaver for admin user. (#88) 2023-06-22 18:50:44 +04:00
Fedor Korotkov 04eaf0415f Update vanilla-sonoma 2023-06-21 17:56:27 -04:00
Nikolay Edigaryev fc12391db4 Use host's DNS servers (#87) 2023-06-21 17:04:50 +04:00
fedor 62bb71fc2c Persist add-certificate binary
Fixes #82
2023-06-16 12:34:42 -04:00
Fedor Korotkov 4625de36fc Update .cirrus.yml 2023-06-14 07:51:50 -04:00
fedor 7221de2158 Bump xcode version 2023-06-14 07:28:53 -04:00
fedor 3ac3ec803c Bump Xcode 2023-06-14 07:28:33 -04:00
fedor 620771594e Bump GHA version 2023-06-14 07:27:53 -04:00
fedor a7907e34db Source 2023-06-14 07:27:53 -04:00
8 changed files with 90 additions and 70 deletions
+38 -12
View File
@@ -1,53 +1,79 @@
task:
name: "Update Base Image"
name: "Update Images"
only_if: $CIRRUS_CRON != ""
timeout_in: 3h
persistent_worker:
labels:
name: dev-mini
env:
TART_REGISTRY_HOSTNAME: ghcr.io
TART_REGISTRY_USERNAME: fkorotkov # GitHub supports only PATs
TART_REGISTRY_PASSWORD: ENCRYPTED[!82ed873afdf627284305afef4958c85a8f73127b09978a9786ac521559630ea6c9a5ab6e7f8315abf9ead09b6eff6eae!]
AWS_ACCESS_KEY_ID: ENCRYPTED[c187b670a17eead88c1698849376273991d09678efe37ae2f0c9738c27a2422741a71c501ef4b6a4df7bff3eca5213a9]
AWS_SECRET_ACCESS_KEY: ENCRYPTED[e456254a53b82e3167f2da23e24c389620cb3f7d47e4e5e7d993813bf9bb18c784d5cb8d88d19632073acc9e1f6096c9]
update_script: brew update && brew upgrade
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
push_base_ecr_script:
- tart push --chunk-size=5 sonoma-base public.ecr.aws/cirruslabs/macos:sonoma-base
push_xcode_ecr_script:
- tart push --chunk-size=5 sonoma-xcode:$XCODE_VERSION public.ecr.aws/cirruslabs/macos:sonoma-xcode-$XCODE_VERSION public.ecr.aws/cirruslabs/macos:sonoma-xcode
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"
only_if: $CIRRUS_TAG != ""
timeout_in: 3h
persistent_worker:
labels:
name: dev-mini
env:
TART_REGISTRY_HOSTNAME: ghcr.io
TART_REGISTRY_USERNAME: fkorotkov # GitHub supports only PATs
TART_REGISTRY_PASSWORD: ENCRYPTED[!82ed873afdf627284305afef4958c85a8f73127b09978a9786ac521559630ea6c9a5ab6e7f8315abf9ead09b6eff6eae!]
AWS_ACCESS_KEY_ID: ENCRYPTED[c187b670a17eead88c1698849376273991d09678efe37ae2f0c9738c27a2422741a71c501ef4b6a4df7bff3eca5213a9]
AWS_SECRET_ACCESS_KEY: ENCRYPTED[e456254a53b82e3167f2da23e24c389620cb3f7d47e4e5e7d993813bf9bb18c784d5cb8d88d19632073acc9e1f6096c9]
update_script: brew update && brew upgrade
info_script:
- 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
push_ecr_script: |
if [[ $CIRRUS_TAG == *"beta"* ]]
then
tart push --chunk-size=5 sonoma-xcode:$CIRRUS_TAG public.ecr.aws/cirruslabs/macos:sonoma-xcode-$CIRRUS_TAG
else
tart push --chunk-size=5 sonoma-xcode:$CIRRUS_TAG public.ecr.aws/cirruslabs/macos:sonoma-xcode-$CIRRUS_TAG public.ecr.aws/cirruslabs/macos:sonoma-xcode
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
+9 -19
View File
@@ -1,35 +1,25 @@
## macOS Packer Templates for Cirrus CI
## macOS Packer Templates for Tart
Repository with Packer templates to build [Tart VMs](https://github.com/cirruslabs/tart) to use with [Cirrus CI](https://cirrus-ci.org/guide/macOS/).
Repository with Packer templates to build [Tart VMs](https://github.com/cirruslabs/tart) to use with [Cirrus Runners](https://tart.run/integrations/github-actions/) and [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-).
See a full list of VMs available [here](https://github.com/orgs/cirruslabs/packages?tab=packages&q=macos-).
## Building Vanilla Image
To build `macos-monterey-vanilla`:
To build `macos-sonoma-vanilla`:
```bash
packer build templates/vanilla-monterey.pkr.hcl
```
To build `macos-ventura-vanilla`:
```bash
packer build templates/vanilla-ventura.pkr.hcl
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=monterey-vanilla templates/disable-sip.pkr.hcl
```
```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
+2 -8
View File
@@ -16,7 +16,7 @@ variable "gha_version" {
}
source "tart-cli" "tart" {
vm_base_name = "ghcr.io/cirruslabs/macos-${var.macos_version}-vanilla:13.4"
vm_base_name = "ghcr.io/cirruslabs/macos-${var.macos_version}-vanilla:latest"
vm_name = "${var.macos_version}-base"
cpu_count = 4
memory_gb = 8
@@ -45,13 +45,6 @@ build {
]
}
# setup DNS
provisioner "shell" {
inline = [
"networksetup -setdnsservers Ethernet 8.8.8.8 8.8.4.4 1.1.1.1",
]
}
# Create a symlink for bash compatibility
provisioner "shell" {
inline = [
@@ -112,6 +105,7 @@ build {
}
provisioner "shell" {
inline = [
"source ~/.zprofile",
"brew install awscli"
]
}
+9 -5
View File
@@ -90,14 +90,18 @@ build {
"sudo defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser admin",
// Disable screensaver at login screen
"sudo defaults write /Library/Preferences/com.apple.screensaver loginWindowIdleTime 0",
// Disable screensaver for admin user
"defaults -currentHost write com.apple.screensaver idleTime 0",
// Prevent the VM from sleeping
"sudo systemsetup -setdisplaysleep Off",
"sudo systemsetup -setsleep Off",
"sudo systemsetup -setcomputersleep Off",
"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 &",
"sleep 3",
"kill -9 %1",
"SAFARI_PID=$!",
"disown",
"sleep 30",
"kill -9 $SAFARI_PID",
// Enable Safari's remote automation and "Develop" menu
"sudo safaridriver --enable",
"defaults write com.apple.Safari.SandboxBroker ShowDevelopMenu -bool true",
+9 -10
View File
@@ -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/032-94355/CBE8CBE1-750D-487E-A393-B90FEF60CEBA/UniversalMac_14.0_23A5257q_Restore.ipsw
# [2]: https://download.developer.apple.com/WWDC_2023/macOS_14_Beta_Restore_Images/UniversalMac_14.0_23A5257q_Restore.ipsw
from_ipsw = "https://updates.cdn-apple.com/2023SummerSeed/fullrestores/032-94355/CBE8CBE1-750D-487E-A393-B90FEF60CEBA/UniversalMac_14.0_23A5257q_Restore.ipsw"
from_ipsw = "https://updates.cdn-apple.com/2023FallFCS/fullrestores/042-86430/DBE44960-58A6-4715-948B-D64F33F769BD/UniversalMac_14.1_23B74_Restore.ipsw"
vm_name = "sonoma-vanilla"
cpu_count = 4
memory_gb = 8
@@ -99,14 +94,18 @@ build {
"sudo defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser admin",
// Disable screensaver at login screen
"sudo defaults write /Library/Preferences/com.apple.screensaver loginWindowIdleTime 0",
// Disable screensaver for admin user
"defaults -currentHost write com.apple.screensaver idleTime 0",
// Prevent the VM from sleeping
"sudo systemsetup -setdisplaysleep Off",
"sudo systemsetup -setsleep Off",
"sudo systemsetup -setcomputersleep Off",
"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=$!",
"disown",
"sleep 30",
"kill -9 %1",
"kill -9 $SAFARI_PID",
// Enable Safari's remote automation and "Develop" menu
"sudo safaridriver --enable",
"defaults write com.apple.Safari.SandboxBroker ShowDevelopMenu -bool true",
+10 -5
View File
@@ -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-43686/945D434B-DA5D-48DB-A558-F6D18D11AD69/UniversalMac_13.5.2_22G91_Restore.ipsw"
vm_name = "ventura-vanilla"
cpu_count = 4
memory_gb = 8
@@ -96,14 +96,18 @@ build {
"sudo defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser admin",
// Disable screensaver at login screen
"sudo defaults write /Library/Preferences/com.apple.screensaver loginWindowIdleTime 0",
// Disable screensaver for admin user
"defaults -currentHost write com.apple.screensaver idleTime 0",
// Prevent the VM from sleeping
"sudo systemsetup -setdisplaysleep Off",
"sudo systemsetup -setsleep Off",
"sudo systemsetup -setcomputersleep Off",
"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=$!",
"disown",
"sleep 30",
"kill -9 %1",
"kill -9 $SAFARI_PID",
// Enable Safari's remote automation and "Develop" menu
"sudo safaridriver --enable",
"defaults write com.apple.Safari.SandboxBroker ShowDevelopMenu -bool true",
@@ -113,6 +117,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"
]
}
}
+10 -8
View File
@@ -8,19 +8,19 @@ packer {
}
variable "macos_version" {
type = string
type = string
}
variable "xcode_version" {
type = string
type = string
}
variable "gha_version" {
type = string
type = string
}
variable "android_sdk_tools_version" {
type = string
type = string
default = "9477386" # https://developer.android.com/studio/#command-tools
}
@@ -65,7 +65,7 @@ build {
provisioner "shell" {
inline = [
"source ~/.zprofile",
"brew install homebrew/cask-versions/temurin11",
"brew install homebrew/cask-versions/temurin17",
"echo 'export ANDROID_HOME=$HOME/android-sdk' >> ~/.zprofile",
"echo 'export ANDROID_SDK_ROOT=$ANDROID_HOME' >> ~/.zprofile",
"echo 'export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator' >> ~/.zprofile",
@@ -76,7 +76,7 @@ build {
"rm android-sdk-tools.zip",
"mv $ANDROID_HOME/cmdline-tools/cmdline-tools $ANDROID_HOME/cmdline-tools/latest",
"yes | sdkmanager --licenses",
"yes | sdkmanager 'platform-tools' 'platforms;android-33' 'build-tools;33.0.1' 'ndk;25.1.8937393'"
"yes | sdkmanager 'platform-tools' 'platforms;android-33' 'build-tools;34.0.0' 'ndk;25.2.9519653'"
]
}
provisioner "shell" {
@@ -138,13 +138,15 @@ build {
"sudo security delete-certificate -Z FF6797793A3CD798DC5B2ABEF56F73EDC9F83A64 /Library/Keychains/System.keychain",
"curl -o add-certificate.swift https://raw.githubusercontent.com/actions/runner-images/fb3b6fd69957772c1596848e2daaec69eabca1bb/images/macos/provision/configuration/add-certificate.swift",
"swiftc add-certificate.swift",
"sudo mv ./add-certificate /usr/local/bin/add-certificate",
"curl -o AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer",
"curl -o DeveloperIDG2CA.cer https://www.apple.com/certificateauthority/DeveloperIDG2CA.cer",
"sudo ./add-certificate AppleWWDRCAG3.cer",
"sudo ./add-certificate DeveloperIDG2CA.cer",
"sudo add-certificate AppleWWDRCAG3.cer",
"sudo add-certificate DeveloperIDG2CA.cer",
"rm add-certificate* *.cer"
]
}
provisioner "shell" {
inline = [
"source ~/.zprofile",
+3 -3
View File
@@ -1,3 +1,3 @@
macos_version = "ventura"
gha_version = "2.303.0"
xcode_version = "14.3"
macos_version = "sonoma"
gha_version = "2.311.0"
xcode_version = "15.1"