ci(apple): compile tvOS and visionOS runners on runner-owning PRs

Merged
TH
8d ago
+139-5

Summary

PR CI compiled only the iOS runner; tvOS/visionOS compiled only at release time (scripts/build-package-xcuitest.mjs), which let #4608 escape to release.

Adds a build-runner-tvos-visionos job to .github/workflows/apple.yml running the same xcodebuild build-for-testing compile (setup-apple-runner-build, one leg per platform, generic simulator destinations, arm64, release variant) on blacksmith-6vcpu-macos-26, whose Xcode ships the tvOS/visionOS SDKs. A device-lane-impact selector step gates it: macOS minutes are spent only on PRs owning runner sources (apple/runner/** and the other own:swift trees), failing open on an unknown diff; main pushes build unconditionally. Registers swift-runner-tvos/swift-runner-visionos in ALL_CHECKS, CHECK_CATALOG, and own:swift ownership so the gate manifest wires the lane.

Touched files: 6 (1 workflow, 2 catalog/selector, 3 tests), +139/-5.

  • BEFORE: tvOS/visionOS compile ran only in release packaging; PR CI built iOS only, so release-time-only build breaks escaped PRs (#4608). AFTER: runner-owning PRs run build-for-testing for tvOS + visionOS; such failures fail the PR.
  • SIZE: +1 workflow job, +2 catalog entries, 0 source lines.
  • PERF: minutes only on runner PRs (selector-gated, cache-backed); release-time escapes on PRs 1 -> 0.
  • COLLOCATION: the tvOS/visionOS guard lives in CHECK_CATALOG/own:swift beside the other runner builds, not only in release scripts.

Validation

Tested SHA: 9cab32a92623f0f621fa3437c0bb2a533ea12173 (clean head).

  • pnpm check:gate-manifest -> ok, 62 checks / 25 lanes (base 60/24).
  • node --test scripts/check-affected/{model,device-lanes}.test.ts scripts/gate/*.test.ts -> 107 pass; vitest --project unit-core (apple-ci-impact, device-lane-impact, root-docs-paths-ignore) -> 74 pass.
  • pnpm check:quick (oxlint 0/0, tsc ok); pnpm format clean; actionlint 1.7.7: no new findings vs base.
  • pnpm check:affected --run --head 9cab32a926...: not completed locally — the shared-host validation lock was held by other worktrees (pids 39662, 15344) and the 300s per-command cap killed the fail-open run mid-suite, so no receipt was emitted. Per docs/agents/pull-requests.md, CI's serialized gate stage validates the pushed head instead.
  • CI obligations: the Apple workflow gains Runner Build (tvOS + visionOS); PR required checks are authoritative. No device lanes or other workflows touched; no source changes.
  • Risk: the first real macOS run confirms the image resolves the generic tvOS/visionOS destinations (same mechanism release packaging uses); a cache-miss first run pays one compile per platform.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.