ci(next): make nightly Release builds incremental

Closed
TE
18d ago
+235-23

Summary

Nightly-next was explicitly skipping the existing Xcode compilation cache and Swift package cache, forcing every Release app build to start cold. This enables both caches for the next track and scopes the Xcode cache lineage with track:nightly-next so next-specific compile flags never reuse classic entries.

The cache remains content-keyed and bounded by the existing cache-save/prune logic. A cold miss still performs the full build and writes the next-track cache for the following run.

Testing

  • Ruby Psych parsed .github/workflows/nightly.yml successfully.
  • Verified the next-track restore/save conditions no longer exclude nightly-next.
  • Verified the toolchain cache key includes track:nightly-next.

Changelog

None; CI performance change only.

Proof

Before: run 39111318928 skipped Restore Xcode compilation cache, skipped Cache Swift packages, and spent 6m31s in Build nightly app (Release).
After: the same workflow path restores the next-specific caches and saves them after a miss.

Checklist

  • No build correctness or signing gates removed
  • Classic nightly cache lineage unchanged
  • Next cache lineage isolated from classic

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


Summary by cubic

Makes nightly-next Release builds incremental by enabling the existing Xcode compilation and Swift package caches, caching Zig tooling and Ghostty helper builds, and preserving source mtimes so Cargo can reuse the OptChat Chief build.

  • Scopes the Xcode cache lineage with track:nightly-next and stores nightly-next writes in the GitHub cache backend, keeping classic R2 credentials separate.
  • Shared Xcode/SPM caches apply only on the Blacksmith fallback; trusted Next Glaeda runners keep their persistent DerivedData and Swift package state.
  • Caches the verified Zig tarball and Ghostty CLI helper builds across runs, so unchanged helpers cost a metadata check plus a copy instead of a rebuild.
  • Caches the fast-tier Cargo registry and target so cmux-next checks recompile only changed crates on warm runners.
  • Keeps the inspector page mtime untouched when bytes are unchanged and replays identical tracked source mtimes after web bundle generation, so repeated bundle builds do not invalidate the warm OptChat Chief crate.
  • Caches stay content-keyed and bounded by existing save/prune logic; a cold miss still performs the full build and writes the caches.