ci(ios): tolerate machine-default Xcode when Xcode_16.app is absent #232

Merged
amiryahaya merged 1 commit from fix/ios-xcode-portable into main 2026-11-20 03:32:45 +01:00
Owner

Part of #146 (macOS CI host).

The Select Xcode step hard-pinned /Applications/Xcode_16.app, which only exists on GitHub-hosted macos-15 images. On the new self-hosted macOS runner (Forgejo runner v12.10.2, host mode, no passwordless sudo, Xcode 26.0 as machine default) the step would fail before any build.

The patch keeps the pinned path when present (byte-identical behavior on GitHub-hosted runners) and otherwise exports DEVELOPER_DIR=$(xcode-select -p) — which is already the Contents/Developer path DEVELOPER_DIR requires — so downstream xcodebuild/xcrun/simctl use the machine default Xcode with no host-state mutation and no sudo.

Review: dual-pass done — ponytail-review (no must-fix, Ship) + superpowers requesting-code-review (no Critical/Important, 2 Minor deferred per reviewer recommendation).

Coverage: N/A — CI workflow YAML only; zero executable code changed. Coverage check not applicable to .github/workflows/*.yml (no coverable code). Verification is the empirical smoke test: ios-ci is dispatched on this branch and must run green end-to-end on the new runner.

Toolchain note: tests will execute under Xcode 26 / iOS 26 simulator runtime (macOS 27.2.1 host), not the Xcode 16 toolchain the workflows were originally written for — acceptable for executing previously compile-verified tests; behavior differences, if any, will surface in this smoke test.

Part of #146 (macOS CI host). The `Select Xcode` step hard-pinned `/Applications/Xcode_16.app`, which only exists on GitHub-hosted macos-15 images. On the new self-hosted macOS runner (Forgejo runner v12.10.2, **host mode**, no passwordless sudo, Xcode 26.0 as machine default) the step would fail before any build. The patch keeps the pinned path when present (byte-identical behavior on GitHub-hosted runners) and otherwise exports `DEVELOPER_DIR=$(xcode-select -p)` — which is already the `Contents/Developer` path `DEVELOPER_DIR` requires — so downstream xcodebuild/xcrun/simctl use the machine default Xcode with no host-state mutation and no sudo. **Review:** dual-pass done — ponytail-review (no must-fix, Ship) + superpowers requesting-code-review (no Critical/Important, 2 Minor deferred per reviewer recommendation). **Coverage: N/A** — CI workflow YAML only; zero executable code changed. Coverage check not applicable to `.github/workflows/*.yml` (no coverable code). Verification is the empirical smoke test: `ios-ci` is dispatched on this branch and must run green end-to-end on the new runner. **Toolchain note:** tests will execute under Xcode 26 / iOS 26 simulator runtime (macOS 27.2.1 host), not the Xcode 16 toolchain the workflows were originally written for — acceptable for executing previously compile-verified tests; behavior differences, if any, will surface in this smoke test.
ci(ios): tolerate machine-default Xcode when Xcode_16.app is absent (#146)
All checks were successful
Security CI / security-scan (pull_request) Successful in 2m48s
cd072c52a3
The Xcode-select step hard-pinned /Applications/Xcode_16.app, which only
exists on GitHub-hosted macos-15 images. On the new self-hosted macOS
runner (host mode, no passwordless sudo) the step would fail. Keep the
pinned path when present; otherwise export DEVELOPER_DIR pointing at the
machine's default Xcode — no sudo required.
Author
Owner

Status: validated end-to-end, merge held pending green CI.

The patch is proven on the new macOS runner (amir-macbook-local, macos-15:host): checkout → patched Xcode step → xcodegen → SPM → app build all pass, and the full suite now executes (455 tests in 126s) under Xcode 27.2 / iOS 27.2 sim.

CI on this branch is red solely because of pre-existing test debt (34 failures + 1 crash) — tracked in #233; they reproduce identically on main code with or without this PR. Per the never-merge-without-green-CI rule the merge is held until the failures are fixed or an explicit exception is made.

Also on the runner host: stale-simulator freeze diagnosed and prevented (NSAppSleepDisabled), iPhone 16 sim on iOS 27.2 runtime, xcpretty installed. Runner runs as a LaunchAgent (tech.failsulit.forgejo-runner), repo-scoped, capacity 1.

**Status: validated end-to-end, merge held pending green CI.** The patch is proven on the new macOS runner (`amir-macbook-local`, macos-15:host): checkout → patched Xcode step → xcodegen → SPM → app build all pass, and the full suite now **executes** (455 tests in 126s) under Xcode 27.2 / iOS 27.2 sim. CI on this branch is red solely because of **pre-existing test debt (34 failures + 1 crash) — tracked in #233**; they reproduce identically on `main` code with or without this PR. Per the never-merge-without-green-CI rule the merge is held until the failures are fixed or an explicit exception is made. Also on the runner host: stale-simulator freeze diagnosed and prevented (`NSAppSleepDisabled`), iPhone 16 sim on iOS 27.2 runtime, xcpretty installed. Runner runs as a LaunchAgent (`tech.failsulit.forgejo-runner`), repo-scoped, capacity 1.
Sign in to join this conversation.
No description provided.