Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,59 @@ jobs:
- name: cargo test --doc
run: cargo test --doc --workspace --locked --all-features --no-fail-fast --target ${{ matrix.platform.target }}

test-sde:
name: cargo test in an emulator
runs-on: ${{ matrix.platform.os }}
env:
# doc tests take a long time to run in the emulator and are already tested elsewhere, so exclude them with --lib --bins --tests
# the rest of the arguments match the native test jobs
CARGO_TEST_ARGS: --lib --bins --tests --workspace --locked --all-features
# SDE package name (for both the tarball and the folder within)
SDE_PKG: sde-external-10.5.0-2026-01-13-lin
strategy:
matrix:
platform:
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
steps:
- uses: actions/checkout@v4

- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_STABLE_VER }}
targets: ${{ matrix.platform.target }}

- name: restore cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}

- name: install Intel Software Development Emulator
run: curl "https://downloadmirror.intel.com/873619/${SDE_PKG}.tar.xz" | tar -Jx

# build the tests outside the emulator, otherwise this job would be very slow
- name: build tests
run: cargo test --no-run $CARGO_TEST_ARGS

- name: run tests on CPU with only SSE2
# -p4p stands for Pentium 4 Prescott, the first Intel 64-bit CPU
run: ${SDE_PKG}/sde64 -p4p -- cargo test $CARGO_TEST_ARGS

- name: run tests on CPU with SSE4.2
# -nhm stands for Nehalem
run: ${SDE_PKG}/sde64 -nhm -- cargo test $CARGO_TEST_ARGS

- name: run tests on CPU with AVX2
# -hsw stands for Haswell
run: ${SDE_PKG}/sde64 -hsw -- cargo test $CARGO_TEST_ARGS

- name: run tests on CPU with AVX-512
# Github Actions doesn't give us AVX-512 so this is the only way to exercise AVX-512 codepaths on CI.
# -icl stands for Ice Lake. Technically Skylake added AVX-512 first, but it's mostly useless there due to
# downclocking. When we do eventually add explicit AVX-512 support, we'll likely target the Ice Lake feature
# level.
run: ${SDE_PKG}/sde64 -icl -- cargo test $CARGO_TEST_ARGS

test-nightly-asan:
name: cargo test with Address Sanitizer
runs-on: ${{ matrix.platform.os }}
Expand Down