Skip to content

CI: wait for the iOS simulator before testing - #30

Merged
taplin merged 1 commit into
mainfrom
ci-wait-for-simulator
Oct 6, 2026
Merged

taplin merged 1 commit into
mainfrom
ci-wait-for-simulator

Conversation

@taplin

@taplin taplin commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes an occasional iOS CI failure: "Unable to find a device matching the provided destination specifier". On a fresh macos-26 runner the simulator service sometimes starts late. xcodebuild then waits 60 seconds, lists no simulators at all (only placeholders), and fails. This happened on #29's second attempt, and a retry passed. It matches actions/runner-images#12948.

  • A new Wait for the simulator step polls xcodebuild -showdestinations for the iPhone 17 for up to 5 minutes. Each round first runs xcrun simctl list, which is the workaround from that issue: it makes the service refresh its runtimes. xcodebuild's errors stay in the log, so a package-resolution failure isn't hidden behind a "no simulator" message.
  • xcodebuild test also gets -destination-timeout 120, in case the device drops out between the check and the run.

Testing

Locally, I ran the step under the runner's shell (bash -e). The success path exits as soon as the iPhone 17 is listed. The timeout path reports and exits 1. CRUD's iOS tests pass 179/179 with the new flag. The real test is this PR's CI on GitHub. Per the issue thread, this makes the flake rarer but doesn't guarantee it's gone.

🤖 Generated with Claude Code

On a fresh macos-26 runner the simulator service can start late.
xcodebuild then lists no simulators at all and the iOS job fails with
"Unable to find a device matching the provided destination specifier"
after its own 60-second wait (Perfect-SQLite #29, second attempt; a
retry passed). This matches actions/runner-images#12948.

Before testing, poll xcodebuild -showdestinations for the iPhone 17 for
up to 5 minutes. Each round first runs simctl list, the workaround from
that issue, which makes the service refresh its runtimes. xcodebuild's
errors stay in the log, so a package-resolution failure isn't hidden.
The test also gets -destination-timeout 120 in case the device drops out
again between the check and the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@taplin
taplin merged commit 94aa59d into main Oct 6, 2026
18 checks passed
@taplin
taplin deleted the ci-wait-for-simulator branch October 6, 2026 13:14
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