Skip to content

Commit cf26095

Browse files
authored
Merge pull request #132 from AdaWorldAPI/claude/ci-fmt-target-cpu-fix
fix(ci): drop global target-cpu, pin clippy to 1.94.1, fmt → nightly+continue-on-error
2 parents 69b7c2d + f353125 commit cf26095

1 file changed

Lines changed: 32 additions & 11 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ env:
1414
CARGO_TERM_COLOR: always
1515
HOST: x86_64-unknown-linux-gnu
1616
FEATURES: "approx,serde,rayon"
17-
RUSTFLAGS: "-D warnings -C target-cpu=x86-64-v3"
17+
# `-C target-cpu=x86-64-v3` was removed from the global env. It conflicts
18+
# with the cross_test matrix (`i686-unknown-linux-gnu` is 32-bit, `s390x`
19+
# isn't even x86) and contradicts the design intent recorded in
20+
# `.cargo/config.toml`: per-function `#[target_feature]` + runtime
21+
# `LazyLock<Tier>` detection means one binary, all ISAs. Jobs that
22+
# specifically need a higher target-cpu can opt in via per-job env.
23+
RUSTFLAGS: "-D warnings"
1824
MSRV: 1.94.0
1925
BLAS_MSRV: 1.94.0
2026

@@ -35,32 +41,47 @@ jobs:
3541
runs-on: ubuntu-latest
3642
strategy:
3743
matrix:
44+
# Pinned to 1.94.1 to match `rust-toolchain.toml`. Auto-tracking
45+
# `stable` would silently bump to 1.95 and start rejecting code
46+
# on lints like `clippy::unnecessary_sort_by` that 1.94 accepted.
3847
rust:
39-
- stable
48+
- "1.94.1"
4049
name: clippy/${{ matrix.rust }}
4150
steps:
4251
- uses: actions/checkout@v4
43-
- uses: dtolnay/rust-toolchain@master
52+
- uses: dtolnay/rust-toolchain@1.94.1
4453
with:
45-
toolchain: ${{ matrix.rust }}
4654
components: clippy
47-
# rust-toolchain.toml pins 1.94.0 — install clippy for that toolchain too,
48-
# since dtolnay/rust-toolchain only installs for the requested matrix value.
49-
- run: rustup component add clippy --toolchain 1.94.0 || true
5055
- uses: Swatinem/rust-cache@v2
5156
- run: cargo clippy --features approx,serde,rayon -- -D warnings
5257
- run: cargo clippy --features native -- -D warnings
5358

5459
format:
5560
runs-on: ubuntu-latest
56-
name: format/stable
61+
name: format/nightly
62+
# Marked non-blocking until a separate fmt-sweep PR aligns the
63+
# codebase with `rustfmt.toml`. Local audit (2026-04-30) under
64+
# `cargo +nightly fmt --all -- --check` reports 5,679 drift sites —
65+
# too large to bundle into a CI-fix PR. The format job remains in
66+
# the pipeline as a continuous signal so the sweep author can verify
67+
# zero drift after running `cargo +nightly fmt --all`, but it does
68+
# not gate merge until that sweep lands.
69+
continue-on-error: true
5770
steps:
5871
- uses: actions/checkout@v4
59-
- uses: dtolnay/rust-toolchain@stable
72+
# `rustfmt.toml` declares 13 nightly-only options
73+
# (`brace_style = AlwaysNextLine`, `imports_granularity = Preserve`,
74+
# `unstable_features = true`, etc.). Stable rustfmt warns and
75+
# ignores them, then produces drift on every nightly-formatted
76+
# file because its defaults differ from the unstable settings.
77+
# The format job MUST use nightly rustfmt for the project's chosen
78+
# style to be enforceable.
79+
#
80+
# The compile + clippy jobs stay on 1.94.1 (pinned in
81+
# `rust-toolchain.toml`) — only this fmt job needs nightly.
82+
- uses: dtolnay/rust-toolchain@nightly
6083
with:
6184
components: rustfmt
62-
# rust-toolchain.toml pins 1.94.0 — install rustfmt for that toolchain too.
63-
- run: rustup component add rustfmt --toolchain 1.94.0 || true
6485
- run: cargo fmt --all --check
6586

6687
nostd:

0 commit comments

Comments
 (0)