Skip to content

Commit 1342e9b

Browse files
committed
chore[ci]: pin all nightly toolchain ci runs
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 6e1e9d5 commit 1342e9b

9 files changed

Lines changed: 43 additions & 18 deletions

.github/AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Nightly Rust toolchain is pinned via `NIGHTLY_TOOLCHAIN` env var in each workflow file — update all instances when changing the version.
2+
For action inputs: `toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}`
3+
For shell commands: `cargo +$NIGHTLY_TOOLCHAIN ...`
4+
5+
All files under `.github/` are linted by `yamllint --strict -c .yamllint.yaml`.

.github/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

.github/workflows/close-fixed-fuzzer-issues.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ permissions:
1515
contents: read
1616
actions: read
1717

18+
env:
19+
NIGHTLY_TOOLCHAIN: nightly-2026-02-05
20+
1821
jobs:
1922
close-fixed:
2023
name: "Retest ${{ matrix.target }}"
@@ -40,7 +43,7 @@ jobs:
4043
- uses: ./.github/actions/setup-rust
4144
with:
4245
repo-token: ${{ secrets.GITHUB_TOKEN }}
43-
toolchain: nightly
46+
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
4447

4548
- name: Install llvm
4649
uses: aminya/setup-cpp@v1

.github/workflows/fuzz-coverage.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: "0 6 * * *" # daily at 6am UTC
66
workflow_dispatch: { }
77

8+
env:
9+
NIGHTLY_TOOLCHAIN: nightly-2026-02-05
10+
811
jobs:
912
coverage:
1013
name: "Coverage: ${{ matrix.fuzz_target }}"
@@ -29,16 +32,16 @@ jobs:
2932
- uses: ./.github/actions/setup-rust
3033
with:
3134
repo-token: ${{ secrets.GITHUB_TOKEN }}
32-
toolchain: nightly
35+
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
3336
components: clippy, rustfmt, llvm-tools
3437

3538
- name: Ensure llvm-tools are installed
3639
run: |
37-
rustup component add llvm-tools --toolchain nightly || \
38-
rustup component add llvm-tools-preview --toolchain nightly
40+
rustup component add llvm-tools --toolchain $NIGHTLY_TOOLCHAIN || \
41+
rustup component add llvm-tools-preview --toolchain $NIGHTLY_TOOLCHAIN
3942
4043
# Verify llvm-profdata is accessible (cargo-fuzz needs it for coverage merging)
41-
LLVM_PROFDATA="$(rustc +nightly --print sysroot)/lib/rustlib/$(rustc +nightly -vV | sed -n 's|host: ||p')/bin/llvm-profdata"
44+
LLVM_PROFDATA="$(rustc +$NIGHTLY_TOOLCHAIN --print sysroot)/lib/rustlib/$(rustc +$NIGHTLY_TOOLCHAIN -vV | sed -n 's|host: ||p')/bin/llvm-profdata"
4245
if [ ! -f "$LLVM_PROFDATA" ]; then
4346
echo "ERROR: llvm-profdata not found at $LLVM_PROFDATA"
4447
echo "Listing bin directory:"
@@ -72,7 +75,7 @@ jobs:
7275
- name: Generate coverage data
7376
run: |
7477
RUSTFLAGS="--cfg vortex_nightly" \
75-
cargo +nightly fuzz coverage --release --debug-assertions \
78+
cargo +$NIGHTLY_TOOLCHAIN fuzz coverage --release --debug-assertions \
7679
${{ matrix.fuzz_target }} \
7780
-- -rss_limit_mb=4096
7881
@@ -81,9 +84,9 @@ jobs:
8184
COVERAGE_DIR="fuzz/coverage/${{ matrix.fuzz_target }}"
8285
8386
# llvm tools are installed via rustup's llvm-tools component
84-
LLVM_TOOLS_BIN="$(rustc +nightly --print sysroot)/lib/rustlib/$(rustc +nightly -vV | sed -n 's|host: ||p')/bin"
87+
LLVM_TOOLS_BIN="$(rustc +$NIGHTLY_TOOLCHAIN --print sysroot)/lib/rustlib/$(rustc +$NIGHTLY_TOOLCHAIN -vV | sed -n 's|host: ||p')/bin"
8588
86-
TARGET_TRIPLE=$(rustc +nightly -vV | sed -n 's|host: ||p')
89+
TARGET_TRIPLE=$(rustc +$NIGHTLY_TOOLCHAIN -vV | sed -n 's|host: ||p')
8790
8891
# cargo-fuzz coverage places the binary at:
8992
# target/<triple>/coverage/<triple>/release/<fuzz_target>

.github/workflows/fuzzer-fix-automation.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
required: true
1919
type: number
2020

21+
env:
22+
NIGHTLY_TOOLCHAIN: nightly-2026-02-05
23+
2124
jobs:
2225
attempt-fix:
2326
name: "Attempt to Fix Fuzzer Crash"
@@ -57,7 +60,7 @@ jobs:
5760
uses: ./.github/actions/setup-rust
5861
with:
5962
repo-token: ${{ secrets.GITHUB_TOKEN }}
60-
toolchain: nightly
63+
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
6164
enable-sccache: "false"
6265

6366
- name: Install llvm
@@ -158,7 +161,7 @@ jobs:
158161
echo "Building fuzzer target: ${{ steps.extract.outputs.target }} (debug mode for faster build)"
159162
160163
# Build the fuzzer target in debug mode (faster than release)
161-
if RUSTFLAGS="--cfg vortex_nightly" cargo +nightly fuzz build --dev --sanitizer=none "${{ steps.extract.outputs.target }}" 2>&1 | tee fuzzer_build.log; then
164+
if RUSTFLAGS="--cfg vortex_nightly" cargo +$NIGHTLY_TOOLCHAIN fuzz build --dev --sanitizer=none "${{ steps.extract.outputs.target }}" 2>&1 | tee fuzzer_build.log; then
162165
echo "✅ Fuzzer target built successfully"
163166
echo "build_success=true" >> $GITHUB_OUTPUT
164167
else
@@ -178,7 +181,7 @@ jobs:
178181
echo "Attempting to reproduce crash with fuzzer (debug mode)..."
179182
180183
# Run fuzzer with crash file (debug mode, no sanitizer, full backtrace)
181-
RUSTFLAGS="--cfg vortex_nightly" RUST_BACKTRACE=full timeout 30s cargo +nightly fuzz run --dev --sanitizer=none "${{ steps.extract.outputs.target }}" "${{ steps.download.outputs.crash_file_path }}" -- -runs=1 -rss_limit_mb=0 2>&1 | tee crash_reproduction.log
184+
RUSTFLAGS="--cfg vortex_nightly" RUST_BACKTRACE=full timeout 30s cargo +$NIGHTLY_TOOLCHAIN fuzz run --dev --sanitizer=none "${{ steps.extract.outputs.target }}" "${{ steps.download.outputs.crash_file_path }}" -- -runs=1 -rss_limit_mb=0 2>&1 | tee crash_reproduction.log
182185
183186
FUZZ_EXIT_CODE=${PIPESTATUS[0]}
184187

.github/workflows/minimize_fuzz_corpus_workflow.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ on:
2828
R2_FUZZ_SECRET_ACCESS_KEY:
2929
required: true
3030

31+
env:
32+
NIGHTLY_TOOLCHAIN: nightly-2026-02-05
33+
3134
jobs:
3235
minimize:
3336
name: "Minimize ${{ inputs.fuzz_target }}"
@@ -54,7 +57,7 @@ jobs:
5457
- uses: ./.github/actions/setup-rust
5558
with:
5659
repo-token: ${{ secrets.GITHUB_TOKEN }}
57-
toolchain: nightly
60+
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
5861

5962
- name: Install cargo fuzz
6063
run: cargo install --locked cargo-fuzz
@@ -89,7 +92,7 @@ jobs:
8992
MINIMIZED_DIR="${CORPUS_DIR}_minimized"
9093
mkdir -p "$MINIMIZED_DIR"
9194
RUSTFLAGS="--cfg vortex_nightly" \
92-
cargo +nightly fuzz cmin $FEATURES_FLAG \
95+
cargo +$NIGHTLY_TOOLCHAIN fuzz cmin $FEATURES_FLAG \
9396
${{ inputs.fuzz_target }} "$CORPUS_DIR" -- "$MINIMIZED_DIR"
9497
rm -rf "$CORPUS_DIR"
9598
mv "$MINIMIZED_DIR" "$CORPUS_DIR"

.github/workflows/publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
release:
99
types: [published]
1010

11+
env:
12+
NIGHTLY_TOOLCHAIN: nightly-2026-02-05
13+
1114
jobs:
1215
package:
1316
uses: ./.github/workflows/package.yml
@@ -36,7 +39,7 @@ jobs:
3639
3740
- name: Release
3841
run: |
39-
cargo +nightly publish -Zpublish-timeout --no-verify --allow-dirty --workspace
42+
cargo +$NIGHTLY_TOOLCHAIN publish -Zpublish-timeout --no-verify --allow-dirty --workspace
4043
env:
4144
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4245
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/run-fuzzer.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ on:
4343
R2_FUZZ_SECRET_ACCESS_KEY:
4444
required: true
4545

46+
env:
47+
NIGHTLY_TOOLCHAIN: nightly-2026-02-05
48+
4649
jobs:
4750
fuzz:
4851
name: "Run ${{ inputs.fuzz_target }}"
@@ -68,7 +71,7 @@ jobs:
6871
- uses: ./.github/actions/setup-rust
6972
with:
7073
repo-token: ${{ secrets.GITHUB_TOKEN }}
71-
toolchain: nightly
74+
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
7275

7376
- name: Install llvm
7477
uses: aminya/setup-cpp@v1
@@ -119,7 +122,7 @@ jobs:
119122
FEATURES_FLAG="--features ${{ inputs.extra_features }}"
120123
fi
121124
RUSTFLAGS="--cfg vortex_nightly" RUST_BACKTRACE=1 \
122-
cargo +nightly fuzz run --release --debug-assertions \
125+
cargo +$NIGHTLY_TOOLCHAIN fuzz run --release --debug-assertions \
123126
$FEATURES_FLAG \
124127
${{ inputs.fuzz_target }} -- \
125128
-max_total_time=${{ inputs.max_time }} -rss_limit_mb=0 \

.github/workflows/wasm-fuzz.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ permissions:
1717

1818
env:
1919
CARGO_TERM_COLOR: always
20+
NIGHTLY_TOOLCHAIN: nightly-2026-02-05
2021

2122
jobs:
2223
wasm-fuzz:
@@ -29,14 +30,14 @@ jobs:
2930
- uses: ./.github/actions/setup-rust
3031
with:
3132
repo-token: ${{ secrets.GITHUB_TOKEN }}
32-
toolchain: nightly
33+
toolchain: ${{ env.NIGHTLY_TOOLCHAIN }}
3334
targets: "wasm32-wasip1"
3435
components: "rust-src"
3536
enable-sccache: "false"
3637

3738
- name: Build WASM fuzz target
3839
run: |
39-
cargo +nightly build \
40+
cargo +$NIGHTLY_TOOLCHAIN build \
4041
--manifest-path fuzz/Cargo.toml \
4142
--target wasm32-wasip1 \
4243
--no-default-features \

0 commit comments

Comments
 (0)