Restart VM while building Xcode variant (#301)

* Restart VM while building Xcode variant

In an attempt to make https://github.com/actions/runner-images/issues/12948 less flaky. Xcode Release Notes at some point mentioend a first boot for another issue so let's make the VM boot twoce and do caching population just to be extra cautios.

* just `xcrun simctl list -v`

* support sonoma
This commit is contained in:
Fedor Korotkov 2025-11-11 18:10:42 -05:00 committed by GitHub
parent d7752dd971
commit 256b8cc1c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 1 deletions

View File

@ -354,10 +354,30 @@ build {
# [2]: https://stackoverflow.com/a/68394101/9316533
provisioner "shell" {
inline = [
"sleep 1800"
"source ~/.zprofile",
"xcrun simctl runtime dyld_shared_cache update --all || sleep 180",
"xcrun simctl list -v",
]
}
// Restart the VM
provisioner "shell" {
inline = [
"sudo shutdown -r now"
]
expect_disconnect = true
}
// Wait for VM to come back up and run simctl commands again
provisioner "shell" {
inline = [
"source ~/.zprofile",
"xcrun simctl runtime dyld_shared_cache update --all || sleep 180",
"xcrun simctl list -v"
]
pause_before = "60s"
}
// Install setup-info-generator
provisioner "shell" {
inline = [