ci: build rust-beta on beta, not the pinned channel - #166
Merged
Conversation
Same mechanism #137 fixed for rust-msrv: the pinned dtolnay action only runs `rustup default`, which rust-toolchain.toml outranks, so `toolchain: beta` installed beta and the job then compiled 1.98.0 — the early-warning purpose was never served. Export RUSTUP_TOOLCHAIN, which does outrank the toml; a job-level `env:` rather than rust-msrv's `$GITHUB_ENV` step, there being no value to read out of a manifest here. The assert cannot match a literal the way rust-msrv's does — beta's version moves every six weeks — so it matches the `-beta`/`-beta.N` suffix, which every beta build carries and no stable one does. That still fails on the exact regression it guards (silently falling back to the pinned 1.98.0), and on a nightly or an unparseable version line; `set -euo pipefail` covers a missing rustc. Left non-gating: `continue-on-error: true`, and not among main's required contexts. Verified on 1.99.0-beta.3 — clippy -D warnings and the test leg are both clean, so this lands green rather than red. Closes #160
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #160.
rust-betainstalled beta and then compiled the pinned channel: thetoolchain action only sets the rustup default (and that step is even
continue-on-error), whichrust-toolchain.tomloutranks. So theearly-warning job has been re-testing 1.98.0. Same mechanism #137 fixed for
rust-msrv; this is its counterpart.Verified against live CI, not just locally — the last green main run shows
rust-betainstallingrustc 1.99.0-beta.3while the compile stepsinherit 1.98.0. rustup names the culprit itself: "the toolchain '1.98.0'
is currently in use (overridden by rust-toolchain.toml)".
The job now exports
RUSTUP_TOOLCHAIN: betaand asserts the effectiverustcis a beta build before compiling.Why the assert keys on the channel suffix
Beta has no fixed version string, so a literal match is impossible and
rustc -vVhas nochannel:field — the-beta/-beta.Nsuffix is theonly signal, and every beta build carries it while no stable release does.
Attacked with fabricated toolchains: stable, nightly,
1.99.0-betarc,empty output, missing
rustc, and a toolchain that prints a beta stringthen exits non-zero all fail, each for an identifiable reason. It cannot
pass merely because some string came back.
It lands green
Ran the job's own legs on 1.99.0-beta.3: clippy
-D warningsclean, fulltest suite
0 failed. No new-lint noise today — and nothing was quieted toachieve that: the diff touches no
.rsfile and adds no#[allow].The job stays non-gating —
continue-on-error: truesurvives, andrust-betais confirmed absent from main's nine required contexts, so afuture beta failure reports without blocking merges.
Note for the first run
rust-cachekeys on the effective rustc, so this job's cache flips fromthe stable hash to the beta one and the first run rebuilds cold. Expected,
self-healing after the first main run, and
cache-on-failure: truewasalready set.
AGENTS.md's toolchain paragraph said
rust-betadoes not override thetoml — true before this change, false after; updated. Adversarial review
returned MERGE-SAFE with no findings.