Skip to content

Commit 6136099

Browse files
committed
ci: update ci
update ci to similar to master version
1 parent ba064c9 commit 6136099

File tree

2 files changed

+36
-23
lines changed

2 files changed

+36
-23
lines changed

.travis.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,22 @@ addons:
1818
- clang-11
1919
- cmake
2020
rust:
21-
- nightly-2021-03-25
22-
- nightly
23-
- beta
2421
- stable
2522
env:
23+
jobs:
24+
# Matrix build of 3 targets against Rust stable
25+
- TARGET=x86_64-unknown-linux-gnu ZLIB_INSTALLED=true AES_NI_SUPPORT=true
26+
- TARGET=x86_64-fortanix-unknown-sgx
2627
global:
2728
- RUST_BACKTRACE=1
2829
# Pinned to this particular nightly version because of core_io. This can be
2930
# re-pinned whenever core_io is updated to the latest nightly.
3031
- CORE_IO_NIGHTLY=nightly-2021-03-25
31-
- SGX_NIGHTLY=nightly-2021-03-25
32+
jobs:
33+
include:
34+
# Test additional Rust toolchains on x86_64
35+
- rust: beta
36+
- rust: nightly
37+
- rust: nightly-2021-03-25
3238
script:
3339
- ./ct.sh

ct.sh

+26-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -ex
33
cd "$(dirname "$0")"
44

@@ -11,28 +11,35 @@ fi
1111

1212
if [ $TRAVIS_RUST_VERSION = "stable" ] || [ $TRAVIS_RUST_VERSION = "beta" ] || [ $TRAVIS_RUST_VERSION = "nightly" ]; then
1313
rustup default $TRAVIS_RUST_VERSION
14-
# make sure that explicitly providing the default target works
15-
cargo test --target x86_64-unknown-linux-gnu
16-
cargo test --release
17-
cargo test --features spin_threading
18-
cargo test --features rust_threading
19-
cargo test --features custom_time,custom_gmtime_r
20-
cargo test --features zlib
21-
cargo test --features pkcs12
22-
cargo test --features pkcs12_rc2
23-
cargo test --features force_aesni_support
24-
cargo test --features dsa
25-
# without these, tests marked with tokio::test do not run, but report OK.
26-
cargo test --features=std,threading,tokio,tokio/net,tokio/io-util,tokio/macros,tokio/rt
14+
rustup target add --toolchain $TRAVIS_RUST_VERSION $TARGET
15+
# The SGX target cannot be run under test like a ELF binary
16+
if [ "$TARGET" != "x86_64-fortanix-unknown-sgx" ]; then
17+
# make sure that explicitly providing the default target works
18+
cargo test --target $TARGET --release
19+
cargo test --features pkcs12 --target $TARGET
20+
cargo test --features pkcs12_rc2 --target $TARGET
21+
cargo test --features dsa --target $TARGET
22+
cargo test --features spin_threading --target $TARGET
23+
cargo test --features rust_threading --target $TARGET
24+
cargo test --features custom_time,custom_gmtime_r --target $TARGET
25+
# without these, tests marked with tokio::test do not run, but report OK.
26+
cargo test --features=std,threading,tokio,tokio/net,tokio/io-util,tokio/macros,tokio/rt --target $TARGET
27+
# If zlib is installed, test the zlib feature
28+
if [ -n "$ZLIB_INSTALLED" ]; then
29+
cargo test --features zlib --target $TARGET
30+
fi
31+
32+
# If AES-NI is supported, test the feature
33+
if [ -n "$AES_NI_SUPPORT" ]; then
34+
cargo test --features force_aesni_support --target $TARGET
35+
fi
36+
else
37+
cargo +$TRAVIS_RUST_VERSION test --no-run --target=$TARGET
38+
fi
2739

2840
elif [ $TRAVIS_RUST_VERSION = $CORE_IO_NIGHTLY ]; then
2941
cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand,time,custom_time,custom_gmtime_r
3042
cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand
31-
32-
elif [ $TRAVIS_RUST_VERSION = $SGX_NIGHTLY ]; then
33-
rustup target add --toolchain $SGX_NIGHTLY x86_64-fortanix-unknown-sgx
34-
cargo +$SGX_NIGHTLY test --no-run --target=x86_64-fortanix-unknown-sgx --features=sgx --no-default-features
35-
3643
else
3744
echo "Unknown version $TRAVIS_RUST_VERSION"
3845
exit 1

0 commit comments

Comments
 (0)