Skip to content

Commit

Permalink
ci: reintroduce x86-64 test for non-SSE environment
Browse files Browse the repository at this point in the history
The old CI test was removed
(#77 (comment))
due to rust-lang/rust#116672
causing a mismatch of data layouts with the custom target
(`src/tests/x86_64-soft_float.json`):

```console
error: data-layout for target `x86_64-soft_float-10047705440633310713`, `e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128`, differs from LLVM target's `x86_64-unknown-none` default layout, `e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128`
```

This PR removes the unused custom target and reintroduces
the CI test with the now-available tier 2 target
[`x86_64-unknown-none`](https://doc.rust-lang.org/nightly/rustc/platfor
m-support/x86_64-unknown-none.html). This makes this test much more
robust, since we don't have to update a custom target ourselves and can
even use stable Rust now.

PR #146
  • Loading branch information
mkroening authored Mar 27, 2024
1 parent 21def52 commit b12ad6d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 0 additions & 15 deletions src/tests/x86_64-soft_float.json

This file was deleted.

0 comments on commit b12ad6d

Please sign in to comment.