ci(nightly): restore warm cache for non-dedicated NEXT workers

TE
5d ago
+45-6

NEXT’s non-dedicated owned Mac path was clearing DerivedData and skipping the shared Xcode/Swift package cache. In run 41253243235, build-nightly-app ran on cmux13s-mac-mini-glaeda-2 from 23:40:45Z to 23:57:05Z (16m20s), while the dedicated *-nightly-next path was not selected.

This restores the existing compilation-cache and Swift package cache restore/save actions for non-dedicated NEXT workers. The dedicated worker remains isolated: it keeps its own DerivedData and local compilation cache, so no two runs share mutable DerivedData. Cache actions use the existing content/toolchain keys and bounded save path.

Leo’s rule is that every build-speed and nightly-speed plan starts with warm DerivedData and the shared compile cache. Leo also asked, “why are changes to these not in my current nightly”; this removes a cold-cache branch from the NEXT path.

Performance:

metricbeforeafterdeltaharness or run link
build-nightly-app wall time16m20spending next nightlypendingrun 41253243235

Validation: python3 -m unittest tests/test_nightly_trusted_routing.py tests/test_nightly_build_state.py (46 passed); bash tests/test_nightly_universal_build.sh passed; git diff --check.

Agent footer: agent session
🤖 Generated with Claude Code


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


Summary by cubic

Restores warm compilation and Swift package caches for non-dedicated NEXT nightly workers, which previously started from cold every run.

  • Cache restore and save steps now run on NEXT runners unless the run is the dedicated nightly-next track with release-derived-data mode incremental.
  • Dedicated NEXT workers keep their isolated DerivedData and caches; their behavior is unchanged.
  • R2 cache restore now preserves a populated persistent cache symlink and seeds an empty one without removing the link.