Skip to content

Commit 41357a0

Browse files
feat: added x86_64-unknown-linux-gnu to the test matrix of
`intrinsic-test`
1 parent ce179da commit 41357a0

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ jobs:
260260
- aarch64_be-unknown-linux-gnu
261261
- armv7-unknown-linux-gnueabihf
262262
- arm-unknown-linux-gnueabihf
263+
- x86_64-unknown-linux-gnu
263264
profile: [dev, release]
264265
include:
265266
- target: aarch64_be-unknown-linux-gnu

ci/intrinsic-test.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ case ${TARGET} in
6666
TEST_CXX_COMPILER="clang++"
6767
TEST_RUNNER="${CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER}"
6868
;;
69+
70+
x86_64-unknown-linux-gnu*)
71+
TEST_CPPFLAGS="-fuse-ld=lld -I/usr/include/x86_64-linux-gnu/"
72+
TEST_CXX_COMPILER="clang++"
73+
TEST_RUNNER="${CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER}"
74+
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_x86.txt
75+
TEST_SAMPLE_INTRINSICS_PERCENTAGE=5
76+
;;
6977
*)
7078
;;
7179

@@ -94,6 +102,22 @@ case "${TARGET}" in
94102
--linker "${CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_LINKER}" \
95103
--cxx-toolchain-dir "${AARCH64_BE_TOOLCHAIN}"
96104
;;
105+
106+
x86_64-unknown-linux-gnu*)
107+
# `CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER` is not necessary for `intrinsic-test`
108+
# because the binary needs to run directly on the host.
109+
# Hence the use of `env -u`.
110+
env -u CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER \
111+
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" \
112+
RUST_LOG=warn RUST_BACKTRACE=1 \
113+
cargo run "${INTRINSIC_TEST}" "${PROFILE}" \
114+
--bin intrinsic-test -- intrinsics_data/x86-intel.xml \
115+
--runner "${TEST_RUNNER}" \
116+
--skip "${TEST_SKIP_INTRINSICS}" \
117+
--cppcompiler "${TEST_CXX_COMPILER}" \
118+
--target "${TARGET}" \
119+
--sample-percentage "${TEST_SAMPLE_INTRINSICS_PERCENTAGE}"
120+
;;
97121
*)
98122
;;
99123
esac

ci/run.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ fi
9090
# Test targets compiled with extra features.
9191
case ${TARGET} in
9292
x86_64-unknown-linux-gnu)
93-
TEST_CPPFLAGS="-fuse-ld=lld -I/usr/include/x86_64-linux-gnu/"
94-
TEST_CXX_COMPILER="clang++"
95-
TEST_RUNNER="${CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER}"
96-
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_x86.txt
97-
TEST_SAMPLE_INTRINSICS_PERCENTAGE=5
9893
export STDARCH_DISABLE_ASSERT_INSTR=1
9994

10095
export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+avx"

0 commit comments

Comments
 (0)