Skip to content

ci: speed up release builds - #426

Merged
fortmarek merged 9 commits into
mainfrom
ci/release-speedups
Nov 9, 2026
Merged

fortmarek merged 9 commits into
mainfrom
ci/release-speedups

Conversation

@fortmarek

@fortmarek fortmarek commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Releases were gated by Build Once.xcframework, which built five static libraries one after another (82 to 94 min), while every release build compiled Once twice from a cold cache.

  • Build XCFramework slices in parallel: the macOS slices come from the darwin build jobs, which already compiled their dependencies, each iOS slice builds in its own job, and a short job assembles, signs, and notarizes the framework.
  • Run the release macOS jobs on Tuist runners with a cache volume for Cargo output.
  • Use the Tuist remote cache for release builds when sign-in and a probe lookup succeed, falling back to the local cache otherwise.
  • Key Rust actions by the host C library on Linux, so the remote cache no longer serves a build script linked against glibc 2.39 to the Ubuntu 22.04 runner. This brings the Linux release builds onto the remote cache.
  • Build the bootstrap Once with the latest released Once through the remote cache, falling back to a Cargo build when the released Once cannot build the current graph. Compile the Cargo fallback without optimizing Once's own crates.
  • Use the Tuist remote cache for the Windows release graph build in the once workflow.

Measurements

End-to-end Release runs on test branches with publishing disabled, measured from run start until publishing would begin:

Run Start to publish-ready
Before, ci/release-e2e-before (main) 107 min (Build Once.xcframework 94 min, darwin builds 36 min, Windows 47 min)
After, cold caches, Cargo bootstrap Linux x86_64 failed on the glibc issue fixed here; other jobs finished in 43 min (Windows)
After, warm, with a once-core change, Cargo bootstrap 30 min (Windows 28.5 min, of which 14 min is the Cargo bootstrap)
After, cold caches for the new action keys, bootstrap built with Once 40 min (Windows)
After, warm, with a once-core change, bootstrap built with Once 24 min (Windows 21.5 min: bootstrap 5.4 min, release build 11.8 min)

Notes

  • Release artifacts can now include remote cache entries written by same-repository branches.
  • A remote cache outage after the probe still fails the build; a rerun recovers.
  • Until a release includes the host C library key, the released Once on Linux x86_64 can still pick up a build script linked against a newer glibc, so that job falls back to the Cargo bootstrap (about 30 seconds lost). The first release from this branch removes the fallback.

ampagent and others added 5 commits November 9, 2026 12:54
The source-built Once that CI uses to drive graph builds only orchestrates
rustc and other tools. A dedicated bootstrap profile skips release LTO,
single-unit codegen, and optimization of the workspace crates, while
dependencies such as the Starlark interpreter stay at opt-level 3.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bfcc-5807-76c0-92bc-c557bc3b66a7
Co-authored-by: Marek Fort <marek@tuist.dev>
The Linux and macOS release builds already read and write the Tuist cache;
the Windows one still rebuilt every dependency from a cold local cache.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bfcc-5807-76c0-92bc-c557bc3b66a7
Co-authored-by: Marek Fort <marek@tuist.dev>
…ross releases

The XCFramework job built five static libraries one after another and gated
every release. The macOS slices now come from the darwin build jobs, which
already compiled their dependencies, and each iOS slice builds in its own
job before a short job assembles, signs, and notarizes the framework.

Release macOS jobs run on Tuist runners with cache volumes for the Cargo
bootstrap and prepared dependencies, and every release build uses the
Tuist remote cache when sign-in and a probe lookup succeed, falling back
to the local cache otherwise.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bfcc-5807-76c0-92bc-c557bc3b66a7
Co-authored-by: Marek Fort <marek@tuist.dev>
…ches across releases

Co-authored-by: Marek Fort <marek@tuist.dev>
Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/release.yml Fixed
ampagent and others added 4 commits November 9, 2026 14:18
Build scripts and other host-linked outputs carry the host glibc's symbol
versions. Without the C library in the rustc toolchain identity, a shared
cache served a build script linked against glibc 2.39 to a glibc 2.35 host,
which could not load it.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bfcc-5807-76c0-92bc-c557bc3b66a7
Co-authored-by: Marek Fort <marek@tuist.dev>
The bootstrap was a cold Cargo build on every release runner, 14 minutes
on Windows. The latest released Once now builds it from this checkout
through the remote cache, so unchanged dependencies are cache hits. A
release that cannot build the current graph falls back to Cargo, which
keeps releases on the current prelude.

Host-linked actions are now keyed by the host C library, so the Linux
builds use the remote cache again.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bfcc-5807-76c0-92bc-c557bc3b66a7
Co-authored-by: Marek Fort <marek@tuist.dev>
@fortmarek
fortmarek marked this pull request as ready for review November 9, 2026 16:10
@fortmarek
fortmarek merged commit 0ea2ef2 into main Nov 9, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants