From eb2412cb1f629c8c5c7991634c8288d3eefda04a Mon Sep 17 00:00:00 2001 From: Edouard Vanbelle Date: Mon, 27 Jul 2026 01:43:44 +0200 Subject: [PATCH] chore(ci): fix target cpu --- .github/workflows/load-nightly.yml | 10 +++++++++- .github/workflows/load-smoke.yml | 12 +++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/load-nightly.yml b/.github/workflows/load-nightly.yml index 31e16c73..82daf863 100644 --- a/.github/workflows/load-nightly.yml +++ b/.github/workflows/load-nightly.yml @@ -57,7 +57,15 @@ jobs: - uses: Swatinem/rust-cache@v2 with: - shared-key: load + # Distinct from load-smoke's `load-v2`. Nightly runs on the + # self-hosted `nuc-loadtest` runner (homogeneous), where + # `-C target-cpu=native` from `.cargo/config.toml` gives the + # accurate perf baseline we want. Smoke runs on the GHA + # heterogeneous pool with `RUSTFLAGS=-C target-cpu=x86-64-v3`. + # Sharing the same cache key would let native-baked proc-macro + # dylibs from nightly leak into smoke's restore set → SIGILL + # on a leaner GHA runner. Separate namespaces prevent that. + shared-key: load-nightly-v2 - name: Install Node 20 # The self-hosted runner image ships Node 12, which can't parse the diff --git a/.github/workflows/load-smoke.yml b/.github/workflows/load-smoke.yml index 330f5536..60cb8157 100644 --- a/.github/workflows/load-smoke.yml +++ b/.github/workflows/load-smoke.yml @@ -18,6 +18,14 @@ on: env: CARGO_TERM_COLOR: always + # `.cargo/config.toml` sets `-C target-cpu=native` for dev speed, but + # GitHub-hosted runners are a heterogeneous pool — cached rlibs / proc- + # macro dylibs baked with AVX-512 on one runner crash with SIGILL when + # rustc dlopens them on a leaner one. Env RUSTFLAGS fully replaces the + # config.toml value (they don't merge), so pinning to `x86-64-v3` here + # (AVX2 baseline — every GHA runner has it) makes cached artifacts + # portable across the pool without touching local dev. + RUSTFLAGS: "-C target-cpu=x86-64-v3" jobs: smoke: @@ -31,7 +39,9 @@ jobs: - uses: Swatinem/rust-cache@v2 with: - shared-key: load + # Bumped suffix busts any existing cache poisoned with native-CPU + # ISA from a prior build (see RUSTFLAGS note above). + shared-key: load-v2 - name: Install k6 uses: grafana/setup-k6-action@v1