fix(ci): portable RUSTFLAGS in publish.yml (stop rustc SIGILL)#102
Merged
Conversation
publish.yml ran `cargo test --workspace` (its pre-publish gate) with no RUSTFLAGS override, so it inherited `target-cpu=native` from the committed .cargo/config.toml. On GitHub's heterogeneous shared-runner fleet that makes rustc itself crash with SIGILL (illegal instruction) on runners whose advertised CPU features exceed what the live-migrated silicon can actually execute. Two v0.5.1 publish attempts died this way; a third (dry-run) passed only because it landed on a compatible runner. ci.yml, release.yml, and bench.yml all already override this with `-C target-cpu=x86-64-v2` for portability. publish.yml was the only one missing it. Add the same override so the publish gate is reproducible. No effect on published crates (cargo publish packages source, not the verification binary), but it unblocks the crates.io publish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The v0.5.1 crates.io publish (
publish.yml) failed twice on itscargo test --workspacepre-publish gate with:rustc itself crashes — not a test failure. The crate source is fine (it built clean in PR #101 CI on macOS + Ubuntu, in
release.yml's binary builds, and in apublish.ymldry-run minutes earlier).Root cause
.cargo/config.tomlsetsrustflags = ["-C", "target-cpu=native"]for local M1 development. Its own comment says CI overrides this for portability — and indeedci.yml,release.yml, andbench.ymlall setRUSTFLAGS: "-C target-cpu=x86-64-v2".publish.ymlwas the only workflow missing that override. It therefore inheritedtarget-cpu=native, and on GitHub's heterogeneous shared-runner fleet that makes rustc emit instructions the underlying (often live-migrated) silicon can't execute → SIGILL. The dry-run passed only because it happened to land on a compatible runner.Fix
Add the same
RUSTFLAGS: "-C target-cpu=x86-64-v2"override the other three workflows use, to thepublishjob env.No effect on published artifacts —
cargo publishpackages crate source, not the verification binary — but it makes the publish gate reproducible and unblocks the 0.5.1 crates.io release.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.