Skip to content

chore(ci): replace to actions-rust-lang/setup-rust-toolchain#210

Merged
stormslowly merged 4 commits into
mainfrom
chore/use-actions-rust-lang-setup-rust-toolchain
May 12, 2026
Merged

chore(ci): replace to actions-rust-lang/setup-rust-toolchain#210
stormslowly merged 4 commits into
mainfrom
chore/use-actions-rust-lang-setup-rust-toolchain

Conversation

@stormslowly
Copy link
Copy Markdown
Collaborator

Summary

Migrate 13 workflow call sites from the personal-account action Boshen/setup-rust to the Rust ecosystem org-maintained equivalent actions-rust-lang/setup-rust-toolchain@v1.16.1 (pinned by SHA 46268bd060767258de96ed93c1251119784f2ab6).

Why

A SHA-pinned third-party action still trusts the upstream account's 2FA — every Renovate bump silently re-extends that trust. Moving toolchain setup from a single maintainer's repo to a Rust ecosystem org reduces the supply-chain blast radius if any one personal account is compromised.

Parameter mapping

Boshen/setup-rust actions-rust-lang/setup-rust-toolchain
save-cache: <expr> cache-save-if: <expr>
restore-cache: false cache: false
tools: <name> extracted into a separate taiki-e/install-action step
components: <name> unchanged

Cache-write security model preserved

Every job that previously gated save-cache on the main branch now gates cache-save-if on main, so fork PRs still cannot write to the shared cache. Jobs that previously defaulted to restore-only under Boshen's defaults are now explicit:

  • lint (clippy), doccache-save-if: \${{ github.ref_name == 'main' }} (newly saves on main, an improvement)
  • testcache-save-if: false (keeps the dedicated cache job as the sole writer of the warm key, avoiding races)
  • format, deny, unused-depscache: false (no caching at all, as before)

Tools that needed extraction

  • cargo-deny (in ci.yml)
  • cargo-codspeed (in benchmark.yml)
  • cargo-llvm-cov (in codecov.yml)

All installed via the already-pinned taiki-e/install-action@v2.75.18.

Test plan

  • CI green across all platforms and matrix variants
  • Cache hit metrics on main remain comparable (check first push to main after merge)
  • Benchmark, codecov, and release-plz jobs still build their respective cargo tools

…t-toolchain

Migrates 13 call sites away from the Boshen/setup-rust personal-account
action to the Rust ecosystem org-maintained equivalent
actions-rust-lang/setup-rust-toolchain v1.16.1, pinned by SHA.

Parameter mapping:
  save-cache: <expr>    -> cache-save-if: <expr>
  restore-cache: false  -> cache: false
  tools: <name>         -> extracted into separate taiki-e/install-action step
  components: <name>    -> components: <name> (unchanged)

Cache-write security model preserved: every job that previously gated
save-cache on the main branch continues to gate cache-save-if on main,
so fork PRs still cannot poison the shared cache. Jobs that defaulted
to restore-only under Boshen's defaults are made explicit with
cache-save-if false or main-only.

Reduces supply-chain exposure to a single Rust-ecosystem org account.
Copilot AI review requested due to automatic review settings May 12, 2026 03:58
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1db57c1df5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates GitHub Actions Rust toolchain setup from Boshen/setup-rust to the Rust ecosystem–maintained actions-rust-lang/setup-rust-toolchain, preserving existing cache-write gating while extracting previously inlined cargo tool installs into explicit taiki-e/install-action steps.

Changes:

  • Replace Boshen/setup-rust usage with SHA-pinned actions-rust-lang/setup-rust-toolchain@v1.16.1 across workflows.
  • Map caching semantics to cache-save-if / cache: false where appropriate, maintaining main-branch-only cache writes.
  • Install cargo-deny, cargo-llvm-cov, and cargo-codspeed via taiki-e/install-action instead of the old tools: input.

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/reusable-build.yml Switch reusable build workflow to setup-rust-toolchain and keep build cache keying.
.github/workflows/release-plz.yml Update release workflow to new Rust toolchain setup action with main-only cache saves.
.github/workflows/codecov.yml Replace Rust setup action and add explicit cargo-llvm-cov installation step.
.github/workflows/ci.yml Replace Rust setup action throughout CI and extract cargo-deny installation.
.github/workflows/benchmark.yml Replace Rust setup action and add explicit cargo-codspeed installation step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 12, 2026

Merging this PR will not alter performance

✅ 12 untouched benchmarks


Comparing chore/use-actions-rust-lang-setup-rust-toolchain (d5e50e5) with main (eb5ac67)

Open in CodSpeed

@stormslowly stormslowly changed the title chore(ci): replace Boshen/setup-rust with actions-rust-lang/setup-rust-toolchain chore(ci): replace to actions-rust-lang/setup-rust-toolchain May 12, 2026
actions-rust-lang/setup-rust-toolchain exports RUSTFLAGS=-D warnings by
default, which Boshen/setup-rust never did. The project carries
pre-existing platform-gated warnings (cfg-conditional unused imports
and dead code on wasm/wasi/windows targets) that surfaced as build
failures once warnings were promoted to errors.

Pass rustflags: "" on every call site to restore the prior posture:
warnings stay warnings for library builds, while the lint job's
explicit cargo clippy -- -D warnings continues to enforce strict
checking on the dedicated lint path.
actions-rust-lang/setup-rust-toolchain exports RUSTFLAGS=-D warnings by
default. Three pre-existing platform-gated warnings then become build
failures:

file_system.rs (wasm/wasi):
  cfg_if and pnp::fs::{VPath, VPathInfo, ZipCache} are referenced only
  inside the non-wasm impl block, and FileSystemOs's options/pnp_lru
  fields are read only there too. Tighten the import guards and mark
  the struct dead-code-allowed on wasm32.

src/tests/mod.rs + lib.rs (windows):
  The node_path test module is entirely posix-gated, leaving its outer
  new_resolver helper and the lib-side with_node_path_dirs hook unused
  on Windows test builds. Gate the mod declaration and the helper on
  cfg(not(target_os = windows)).

With these warnings fixed at the source, the rustflags workaround on
every setup-rust-toolchain call site is reverted, so the new default
-D warnings posture now tightens CI instead of being neutralized.
@stormslowly
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f87b2189a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
@stormslowly stormslowly merged commit 4574c84 into main May 12, 2026
21 checks passed
@stormslowly stormslowly deleted the chore/use-actions-rust-lang-setup-rust-toolchain branch May 12, 2026 08:41
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