Skip to content

ci(ios): install the simulator runtime when the runner image lacks it - #4607

Merged
datlechin merged 3 commits into
mainfrom
ci/ios-simulator-runtime
Nov 27, 2026
Merged

datlechin merged 3 commits into
mainfrom
ci/ios-simulator-runtime

Conversation

@datlechin

@datlechin datlechin commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Cause: the xcode-27 image can unmount a simulator runtime mid-job ([macOS] xcode-27-arm64: duplicate watchOS 27.0 runtime actions/runner-images#14946). 3 of 8 recent iOS jobs built, then failed to install on iPhone 18 Pro / iOS 27.2 with "runtime path not found" (run 45739341369). The old guard checked the device list before the build. Its fallback, xcodebuild -downloadPlatform iOS, installs iOS 27.1, which has no iPhone 18 Pro.
  • iOS tests run as build-for-testing on generic/platform=iOS Simulator with ARCHS=arm64, as verify.sh ios builds, then test-without-building on the UDID the new step picks.
  • New apple/scripts/ci/boot-ios-simulator.py, run right before the tests. It boots the iPhone 18 Pro on the newest iOS runtime that simctl list runtimes marks available and whose bundle is on disk. It accepts the device once it has stayed booted on a mounted runtime for 60 s.
  • A device that fails is shut down and the next one is tried. If none is left and the device's newest runtime is gone, the script runs xcodebuild -downloadPlatform iOS -buildVersion <that version>. It then tries every device on a mounted runtime once more. If that fails too, it exits with an ::error:: naming the device, followed by the runtime list. It stops after 15 minutes; the step's 20-minute limit is for a hung simctl. The job limit goes from 70 to 85 minutes to fit the step.
  • The build writes its own Build.xcresult, so the summary and the artifact keep the build errors.
  • The change detector's ios suite watches the new script.
  • verification-apple.md Reading CI covers the artifact's bundles and how to read a red boot step.

Test plan

  • test_boot_ios_simulator.py covers each path:

    • the newest mounted runtime wins;
    • a runtime listed as available with no bundle is skipped;
    • a runtime that unmounts during the boot or while the device settles moves on to the next device;
    • a failed or hung boot moves on;
    • the download runs only when the runtime is gone, names its version, and is followed by one more pass;
    • a download that does not help, a failing, hung or garbled simctl list, hung boots and a download that runs out of time all end in the error within the budget;
    • child output stays off stdout.
  • test_detect_changed_paths.py: the ios suite runs on the script. This test fails on main.

  • actionlint, zizmor, shellcheck, and the scripts/ci, apple/scripts/ci and apple/scripts/lib unit tests pass.

  • This PR's iOS job runs the new steps on the runner.

  • CI on b397f83: the Fast checks and Debian (stonking) failures are account::step_up_tests::a_step_up_that_comes_back_after_an_earlier_sign_in_committed_is_revoked_not_adopted, red on main too (nightly 45883112027). test(core): let each step-up test permit release one sign-in page #4619 fixes that test. This PR changes no Linux job.

  • Review: Codex, one round on the branch after merging main, no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant