Skip to content

ci: install prebuilt rcodesign instead of building from source - #2386

Merged
dividedmind merged 1 commit into
mainfrom
chore/macos-binary-codesign
Aug 14, 2026
Merged

ci: install prebuilt rcodesign instead of building from source#2386
dividedmind merged 1 commit into
mainfrom
chore/macos-binary-codesign

Conversation

@dividedmind

@dividedmind dividedmind commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

bin/presign built apple-codesign from git via cargo install, compiling the whole Rust dependency tree on every macOS job. This cost several minutes on each of macos-x64 and macos-arm64.

The ~/.cargo cache could not help: cargo install compiles in a throwaway target directory, so caching ~/.cargo only avoids crate downloads, never the compile. It skipped the install entirely only when ~/.cargo/bin/rcodesign itself was restored, and that rarely happened for releases -- a run can restore caches only from its own ref or the default branch, so every release tag started cold.

Download the pinned upstream 0.29.0 prebuilt binary instead and verify its sha256. Pinning a release also makes the tool that signs our releases reproducible, which --branch main did not.

All flags used by bin/sign and bin/notarize work on 0.29.0; --entitlements-xml-path and --api-key-path are accepted aliases of the newer --entitlements-xml-file and --api-key-file.

Drop the now-unused cargo caches from both macOS jobs and from the windows job, which never used Rust at all — it signs via azure/trusted-signing-action, so that step restored and re-saved an empty ~/.cargo for nothing.

bin/presign built apple-codesign from git via `cargo install`,
compiling the whole Rust dependency tree on every macOS job. This
cost several minutes on each of macos-x64 and macos-arm64.

The `~/.cargo` cache could not help: `cargo install` compiles in a
throwaway target directory, so caching ~/.cargo only avoids crate
downloads, never the compile. It skipped the install entirely only
when ~/.cargo/bin/rcodesign itself was restored, and that rarely
happened for releases -- a run can restore caches only from its own
ref or the default branch, so every release tag started cold.

Download the pinned upstream 0.29.0 prebuilt binary instead and
verify its sha256. Pinning a release also makes the tool that signs
our releases reproducible, which `--branch main` did not.

All flags used by bin/sign and bin/notarize work on 0.29.0;
--entitlements-xml-path and --api-key-path are accepted aliases of
the newer --entitlements-xml-file and --api-key-file.

Drop the now-unused cargo caches from both macOS jobs and from the
windows job, which never used Rust at all -- it signs via
azure/trusted-signing-action, so that step restored and re-saved an
empty ~/.cargo for nothing.

Assisted-by: Claude:claude-opus-5[1m]
@dividedmind dividedmind self-assigned this Aug 10, 2026
@dividedmind dividedmind added the build native Build and save native packages in the GitHub workflow label Aug 10, 2026
@dividedmind
dividedmind force-pushed the chore/macos-binary-codesign branch from d7bf999 to b827a18 Compare August 10, 2026 17:53
@dividedmind
dividedmind requested review from kgilpin and a lite review from Copilot August 10, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR speeds up macOS CI release signing by replacing a cargo install build-from-source of apple-codesign/rcodesign with a pinned, checksum-verified prebuilt rcodesign release, and removes now-unused Cargo caches from native build jobs.

Changes:

  • Update bin/presign to download a pinned rcodesign (apple-codesign) universal macOS tarball and verify it via SHA-256 before installation.
  • Remove ~/.cargo cache restore steps from macOS and Windows native build jobs to avoid wasted cache work.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
bin/presign Switches rcodesign installation from cargo install (git main) to a pinned prebuilt release verified by sha256.
.github/workflows/build-native.yml Removes Cargo cache restore steps from jobs that no longer need Rust/Cargo.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dividedmind
dividedmind merged commit 20ed0aa into main Aug 14, 2026
27 checks passed
@dividedmind
dividedmind deleted the chore/macos-binary-codesign branch August 14, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build native Build and save native packages in the GitHub workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants