Skip to content

ci: cache macOS dist dependencies and retry wheel uploads - #1422

Merged
chio-labs-delivery[bot] merged 2 commits into
mainfrom
ci/faster-wheel-builds
Nov 12, 2026
Merged

chio-labs-delivery[bot] merged 2 commits into
mainfrom
ci/faster-wheel-builds

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Why

Release wheel builds are slow and fragile on macOS. A cold arm64 dist build took 60 minutes in the 0.212.0 release, half of the 120-minute job limit, and a transient DNS error during the arm64 artifact upload cost a whole rebuild.

Changes

  • The macOS wheel jobs restore compiled dependencies for dist builds through Swatinem/rust-cache, keyed on Cargo.lock, the toolchain, the cargo profile and the target.
  • A new Dist Dependency Cache workflow is the only writer. It runs on pushes to main and daily, looks up both macOS keys and, when one is missing, builds only the macOS legs through Build Distributions and saves the dependencies. It has its own concurrency group, so its hour-long cold build does not hold back the Verify caches. Pull request, merge queue, Release Distributions and Publish runs can only restore.
  • A failed wheel artifact upload retries once, replacing any partial artifact.
  • The wheel job timeout rises from 120 to 150 minutes.

DuckShop edge case: not applicable. This is CI configuration only.

Verification

  • actionlint passes on the changed workflows.
  • A dispatch on a WIP branch built only the two macOS legs and skipped sdist. The writer lookup and the wheel-job restore computed identical keys, and save-if was false off main.
  • The saving is measured after the first warm release build and reported then.
  • One independent review, then a follow-up on its two fixed findings.

Build Distributions restores compiled dependencies on the two macOS legs,
keyed on the lockfile, toolchain, cargo profile and target. Only the Rust
Build Cache workflow on main saves them, building the macOS legs when the
key is missing, so pull request and release builds only restore.

A failed wheel upload retries once, replacing any partial artifact, and
the wheel job timeout rises from 120 to 150 minutes.
The macOS writer takes about an hour on a cold key, so it now runs in Dist
Dependency Cache with its own concurrency group instead of holding back the
Verify caches in Rust Build Cache. Only dist-profile builds restore it,
since nothing writes release-profile macOS caches.
@kvlonge kvlonge added the full-verify Run the full Verify matrix on this pull request label Nov 12, 2026 — with Amp for GitHub
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 58c4134 Nov 12, 2026
59 of 60 checks passed
@chio-labs-delivery
chio-labs-delivery Bot deleted the ci/faster-wheel-builds branch November 12, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-verify Run the full Verify matrix on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant