diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 786c59ab..38c646f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,6 +162,29 @@ jobs: - name: Run tests without any features enabled (core-only) run: cargo test --verbose --no-default-features + # This job uses a target to build the memchr crate on x86-64 but *without* + # SSE/AVX target features. This is relevant for virtually all OS kernels. + build-for-x86-64-but-non-sse-target: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + targets: x86_64-unknown-none + - name: Build for x86_64-unknown-none with only 'alloc' enabled + run: cargo build --verbose --no-default-features --features alloc --target x86_64-unknown-none + - name: Run tests for x86_64-unknown-linux-gnu without SSE + run: cargo test --verbose + env: + RUSTFLAGS: -C target-feature=-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float + - name: Run tests for x86_64-unknown-linux-gnu without SSE with only 'alloc' enabled + run: cargo test --verbose --no-default-features --features alloc + env: + RUSTFLAGS: -C target-feature=-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float + # This job runs a stripped down version of CI to test the MSRV. The specific # reason for doing this is that dev-dependencies tend to evolve more quickly. # There isn't as tight of a control on them because, well, they're only used diff --git a/src/tests/x86_64-soft_float.json b/src/tests/x86_64-soft_float.json deleted file mode 100644 index b77649ef..00000000 --- a/src/tests/x86_64-soft_float.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "llvm-target": "x86_64-unknown-none", - "target-endian": "little", - "target-pointer-width": "64", - "target-c-int-width": "32", - "os": "none", - "arch": "x86_64", - "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", - "linker-flavor": "ld.lld", - "linker": "rust-lld", - "features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float", - "executables": true, - "disable-redzone": true, - "panic-strategy": "abort" -}