CI: fix build-simd job (#436)

The `RUSTFLAGS` were getting applied to build scripts, which caused them
to crash with SIGILL.

According to this issue, RUSTFLAGS won't be applied to build scripts
when cross-compiling by passing the `--target` attribute:

https://github.com/rust-lang/cargo/issues/4423

This attempts to work around the problem by explicitly passing:

    --target x86_64-unknown-linux-gnu
This commit is contained in:
Tony Arcieri 2022-11-13 21:21:24 -07:00 committed by GitHub
parent 081f632d91
commit 7d275100bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,10 +38,10 @@ jobs:
# Build with AVX2 features, then with AVX512 features # Build with AVX2 features, then with AVX512 features
- env: - env:
RUSTFLAGS: "-C target_feature=+avx2" RUSTFLAGS: "-C target_feature=+avx2"
run: cargo build --no-default-features --features "std simd_backend" run: cargo build --target x86_64-unknown-linux-gnu --features simd_backend
- env: - env:
RUSTFLAGS: "-C target_feature=+avx512ifma" RUSTFLAGS: "-C target_feature=+avx512ifma"
run: cargo build --no-default-features --features "std simd_backend" run: cargo build --target x86_64-unknown-linux-gnu --features simd_backend
test-defaults-serde: test-defaults-serde:
name: Test default feature selection and serde name: Test default feature selection and serde