ci(build): restore -C target-cpu=x86-64-v3 on published x86_64 builds (#20)
Some checks failed
Rust / build-linux (linux-aarch64, ARM64, ubuntu-24.04-arm, aarch64-unknown-linux-gnu) (push) Waiting to run
Rust / build-windows (windows-aarch64, woa64, windows-11-arm, aarch64-pc-windows-msvc) (push) Waiting to run
Rust / build-windows (windows-x86_64, win64, windows-2025, x86_64-pc-windows-msvc) (push) Waiting to run
Rust / build-macos (macos-aarch64, ARM64, aarch64-apple-darwin) (push) Waiting to run
Rust / build-android (29.0.14206865, ubuntu-24.04, 33) (push) Waiting to run
Rust / Collect release artifacts (push) Blocked by required conditions
Rust-lint / lint-linux (push) Waiting to run
Rust / build-linux (linux-x86_64, X64, ubuntu-24.04, x86_64-unknown-linux-gnu) (push) Has been cancelled

This commit is contained in:
pbwraith 2026-08-26 08:45:18 +02:00
commit f0d0fc370f

View File

@ -67,6 +67,15 @@ jobs:
https://github.com/llvm/llvm-project/releases/download/llvmorg-${{
env.LLVM_VERSION }}/LLVM-${{ env.LLVM_VERSION }}-Linux-${{
matrix.llvm }}.tar.xz
# The published x86_64 release artifact is the only Linux build that may
# use the AVX2/BMI2 baseline (.cargo/config.toml deliberately keeps the
# default build portable after !17; see issue #20). RUSTFLAGS REPLACES
# config rustflags, so set it here — per matrix row — never in the
# config. The aarch64 row must not receive any RUSTFLAGS (an empty
# RUSTFLAGS would also drop its -fuse-ld=lld link-arg).
- name: Set RUSTFLAGS for x86_64 (x86-64-v3)
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
run: echo "RUSTFLAGS=-C target-cpu=x86-64-v3" >> $GITHUB_ENV
- name: Build
run: |
cargo build --profile ${{ env.BUILD_PROFILE }} -v --target=${{ matrix.target }}
@ -115,6 +124,14 @@ jobs:
https://github.com/llvm/llvm-project/releases/download/llvmorg-${{
env.LLVM_VERSION }}/LLVM-${{ env.LLVM_VERSION }}-${{ matrix.llvm
}}.exe
# The published x86_64 Windows artifact must keep the optimised baseline
# (issue #20). RUSTFLAGS REPLACES config rustflags, so carry the 8 MB
# stack link-arg the config supplies for Windows alongside the CPU flag;
# the aarch64 row must not receive any RUSTFLAGS (an empty RUSTFLAGS
# would also drop its /STACK:8388608 link-arg).
- name: Set RUSTFLAGS for x86_64 (x86-64-v3 + 8 MB stack)
if: ${{ matrix.target == 'x86_64-pc-windows-msvc' }}
run: echo "RUSTFLAGS=-C target-cpu=x86-64-v3 -C link-arg=/STACK:8388608" >> $env:GITHUB_ENV
- name: Build
run: |
cargo build --profile ${{ env.BUILD_PROFILE }} -v --target=${{ matrix.target }}