fix(ios): pin runner build roots under derived data

Merged
OK
2mo ago
+123-0

Summary

From e2e feedback: on a host whose Xcode settings use a custom or legacy build location, the runner build failed with "Failed to locate .xctestrun after build". -derivedDataPath alone does not override that preference, so products landed outside the runner cache directory.

The daemon runner build and scripts/build-xcuitest-apple.sh now pass SYMROOT, OBJROOT, and SHARED_PRECOMPS_DIR pinned to the default layout under the derived path. These are location settings, not compiler recipe, so they stay out of the cache-identity build settings.

6 files touched. Rebase onto main resolved conflicts with the ARCHS resolver and the xcuitest-build-settings.ts refactor; the new test's fake build now seeds a certifiable product bundle.

Validation

Tested commit: 86fd3f4277d76d48b1fe1f8d9acd4ad6d0d7f3bc (on upstream/main 9a245d0ef).

  • New runner-artifact-build-location.test.ts (fake xcodebuild honoring a custom build location): fails with the pin removed, passes with it; also asserts cache reuse without rebuild.
  • scripts/__tests__/runner-isolation-diagnostics.test.ts: script passes the three pinned roots.
  • pnpm check:affected --run --base upstream/main: all runnable checks passed (447 files / 3344 related tests, xctest-selection, packaged-runner-swift).
  • Live, iOS 27 sim (pre-rebase head) with an xcodebuild wrapper injecting IDEBuildLocationStyle=Custom: before, build failed to locate .xctestrun; after, tap works, a second run reuses the cache, and the normal path still works.