fix(fuzz-ci): build cargo-fuzz with stable, not the nightly override

Installing cargo-fuzz under a nightly directory override made rustix's
build script (a cargo-fuzz dependency) gate on `rustc_attrs`, which this
runner's nightly rejects as reserved-for-rustc. Install nightly without
overriding the directory default so `cargo install cargo-fuzz` still
builds under stable; only `fuzz build`/`fuzz run` opt into `+nightly`.
This commit is contained in:
Nils Andreas Svee committed 2026-08-19 23:36:08 +07:00
1 parent 719073df1c
commit 5ce5f4fcda
1 file changed
+10 -2
+10 -2
View File
@@ -29,12 +29,20 @@ jobs:
with:
persist-credentials: false
- name: Install nightly Rust toolchain
- name: Install stable Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
with:
toolchain: nightly
cache-key: fuzz
- name: Install nightly Rust toolchain
# Installed alongside, but deliberately not made the directory
# default: cargo-fuzz itself is built with the default stable
# toolchain below, and only `fuzz build`/`fuzz run` are run with
# `+nightly`. Building cargo-fuzz's own dependency tree under a
# nightly override can trip build scripts (e.g. rustix) that gate
# unstable internal attributes on detecting a nightly compiler.
run: rustup toolchain install nightly --profile minimal --no-self-update
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --locked --version "${CARGO_FUZZ_VERSION}"