Skip to content

Commit e7642ee

Browse files
committed
[ci] add intel_sde feature
1 parent 6db8ed9 commit e7642ee

File tree

6 files changed

+16
-6
lines changed

6 files changed

+16
-6
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ matrix:
88
- env: TARGET=i586-unknown-linux-gnu
99
- env: TARGET=i686-unknown-linux-gnu
1010
- env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
11-
- env: TARGET=x86_64-unknown-linux-gnu-emulated NO_ADD=1 STDSIMD_TEST_EVERYTHING=1
11+
- env: TARGET=x86_64-unknown-linux-gnu-emulated NO_ADD=1 STDSIMD_TEST_EVERYTHING=1 FEATURES="intel_sde"
1212
- env: TARGET=arm-unknown-linux-gnueabihf
1313
- env: TARGET=armv7-unknown-linux-gnueabihf
1414
- env: TARGET=aarch64-unknown-linux-gnu
@@ -33,7 +33,7 @@ install:
3333

3434
script:
3535
- cargo generate-lockfile
36-
- ci/run-docker.sh $TARGET
36+
- ci/run-docker.sh $TARGET $FEATURES
3737

3838
notifications:
3939
email:

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ cupid = "0.4.0"
3232

3333
[features]
3434
strict = []
35+
intel_sde = []

ci/run-docker.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ run() {
1616
--env CARGO_HOME=/cargo \
1717
--volume `rustc --print sysroot`:/rust:ro \
1818
--env TARGET=$target \
19+
--env FEATURES=$2 \
1920
--env STDSIMD_TEST_EVERYTHING \
2021
--volume `pwd`:/checkout:ro \
2122
--volume `pwd`/target:/checkout/target \
@@ -31,5 +32,5 @@ if [ -z "$1" ]; then
3132
run $d
3233
done
3334
else
34-
run $1
35+
run $1 $2
3536
fi

ci/run.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ case ${TARGET} in
1515
;;
1616
esac
1717

18+
FEATURES="strict,$FEATURES"
19+
1820
echo "RUSTFLAGS=${RUSTFLAGS}"
21+
echo "FEATURES=${FEATURES}"
1922

20-
cargo test --target $TARGET --features "strict"
21-
cargo test --release --target $TARGET --features "strict"
23+
cargo test --target $TARGET --features $FEATURES
24+
cargo test --release --target $TARGET --features $FEATURES

src/x86/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ pub use self::avx2::*;
1616
pub use self::abm::*;
1717
pub use self::bmi::*;
1818
pub use self::bmi2::*;
19+
20+
#[cfg(not(feature = "intel_sde"))]
1921
pub use self::tbm::*;
2022

2123
pub use self::runtime::{__unstable_detect_feature, __Feature};
@@ -48,4 +50,6 @@ mod avx2;
4850
mod abm;
4951
mod bmi;
5052
mod bmi2;
53+
54+
#[cfg(not(feature = "intel_sde"))]
5155
mod tbm;

src/x86/xsave.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ mod tests {
377377
assert_eq!(a, b);
378378
}
379379

380+
#[cfg(not(feature = "intel_sde"))]
380381
#[simd_test = "xsaves"]
381382
unsafe fn xsaves() {
382383
let m = 0xFFFFFFFFFFFFFFFF_u64; //< all registers
@@ -389,7 +390,7 @@ mod tests {
389390
assert_eq!(a, b);
390391
}
391392

392-
#[cfg(not(target_arch = "x86"))]
393+
#[cfg(not(any(target_arch = "x86", feature = "intel_sde")))]
393394
#[simd_test = "xsaves"]
394395
unsafe fn xsaves64() {
395396
let m = 0xFFFFFFFFFFFFFFFF_u64; //< all registers

0 commit comments

Comments
 (0)