ci(ios): fix iOS CI — pin simulator destination + DerivedData path#8
Merged
Conversation
3a7647c to
a515347
Compare
5105e34 to
0603be6
Compare
The post-PR-#7 iOS run on main failed at the Coverage step — not tests. Build succeeded, all 20 tests passed, but: $(find ~/Library/Developer/Xcode/DerivedData -name '*.xcresult' | head -1) expanded to empty because xcodebuild wrote DerivedData somewhere the find command didn't look (runners don't always honor the default ~/Library path). xcrun xccov view got called with an empty arg and failed with "Must supply a report or archive to view", which bubbled up as an overall CI failure. Two changes: 1. Pin DerivedData to ios/build/DerivedData via -derivedDataPath, so the xcresult lives at a known, workspace-relative location. 2. Make the Coverage step tolerant of a missing xcresult — log + exit 0 instead of crashing. Coverage reporting is informational; a missing report should never fail the pipeline. Also added `set -o pipefail` to the Build & Test step so a future xcodebuild failure isn't hidden by xcbeautify's exit code. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0603be6 to
5141dd5
Compare
Owner
Author
|
This PR tried to unblock the iOS workflow for PR #2. Every layer of debt surfaced another layer beneath it. In order discovered:
Recommended next steps (not urgent)
What works today
PR #2 (actions/checkout bump) remains blocked on this PR. Low priority since main is functional. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two silent iOS CI bugs that have been broken since the workflow was first added in Task 0.14 — neither showed up until PR #2 (actions/checkout bump) triggered an iOS run against real content.
Bug 1 — `OS=latest` destination specifier doesn't resolve
The destination `platform=iOS Simulator,OS=latest` isn't precise enough on macos-14 runners (Xcode 16.2). xcodebuild fails with:
```
error: Unable to find a device matching the provided destination specifier:
{ platform:iOS Simulator, OS:latest }
```
xcodebuild exits with code 70 — but the step was piped through `xcbeautify --is-ci` without `pipefail`, so xcbeautify's exit 0 masked the failure. All iOS CI runs prior to this PR have been exiting before tests started; the green checkmarks on Phase 0 CI were never actually running tests.
Fix: pin to a named simulator that's reliably present on the runner image (`name=iPhone 15`).
Bug 2 — Coverage step can't find the xcresult
After the xcodebuild failure, the Coverage step's `find ~/Library/Developer/Xcode/DerivedData` produced an empty string and `xcrun xccov view` errored out. That's the visible failure on the run following PR #7's merge.
Fix:
Also
Test plan
After this merges, PRs #2 (actions/checkout bump) should also go green.
🤖 Generated with Claude Code