Skip to content

Commit 0ba416f

Browse files
BtXinclaude
andcommitted
fix(ci): install rustfmt component for the pinned toolchain
The old `rustup toolchain install stable` was a no-op because runners preinstall stable with rustfmt included. The pinned 1.96.1 toolchain is a fresh install under the runner's minimal rustup profile, which has no rustfmt, so `cargo fmt --check` failed. Add it alongside llvm-tools-preview in the test job's install step. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 39c5b0b commit 0ba416f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,12 @@ jobs:
159159
sudo apt-get update
160160
sudo apt-get install -y protobuf-compiler
161161
- name: Install Rust
162-
# Version comes from rust-toolchain.toml.
163-
run: rustup toolchain install --component llvm-tools-preview
162+
# Version comes from rust-toolchain.toml. Components are listed here
163+
# rather than in the toolchain file so the Docker build doesn't pull
164+
# them: rustfmt for `cargo fmt`, llvm-tools-preview for coverage.
165+
# Runners install fresh pinned toolchains with the minimal profile,
166+
# which includes neither.
167+
run: rustup toolchain install --component llvm-tools-preview,rustfmt
164168
- name: Install cargo-llvm-cov
165169
uses: taiki-e/install-action@cargo-llvm-cov
166170
- name: install nextest

0 commit comments

Comments
 (0)