Skip to content

Commit

Permalink
CI: fix build-simd job
Browse files Browse the repository at this point in the history
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:

rust-lang/cargo#4423

This attempts to work around the problem by explicitly passing:

    --target x86_64-unknown-linux-gnu
  • Loading branch information
tarcieri committed Nov 14, 2022
1 parent 081f632 commit b85b720
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
# Build with AVX2 features, then with AVX512 features
- env:
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:
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:
name: Test default feature selection and serde
Expand Down

0 comments on commit b85b720

Please sign in to comment.