Skip to content

Commit 966b487

Browse files
committed
Split up Travis into 4 jobs
This improves parallelism (Travis will run 5 jobs at once) and avoids redundancy (the core_io + nightly builds are being run twice, in the stable and beta builds).
1 parent a342308 commit 966b487

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

.travis.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ branches:
77
# Not really necessary, just to get a green badge on “master”
88
- master
99
language: rust
10+
os: linux
1011
dist: xenial
1112
addons:
1213
apt:
@@ -15,21 +16,18 @@ addons:
1516
- libclang-3.8-dev
1617
- clang-3.8
1718
- cmake
18-
rust:
19-
- stable
20-
- beta
21-
matrix:
22-
allow_failures:
23-
- rust: beta
2419
env:
2520
global:
2621
- RUST_BACKTRACE=1
2722
# Pinned to this particular nightly version because of core_io. This can be
2823
# re-pinned whenever core_io is updated to the latest nightly.
2924
- CORE_IO_NIGHTLY=nightly-2019-07-01
3025
- LLVM_CONFIG_PATH=llvm-config-3.8
26+
matrix:
27+
include:
28+
- env: TOOLCHAIN="stable"
29+
- env: TOOLCHAIN="beta"
30+
- env: TOOLCHAIN="coreio_nightly"
31+
- env: TOOLCHAIN="sgx"
3132
script:
32-
- rustup toolchain add $CORE_IO_NIGHTLY
33-
- rustup toolchain add nightly
34-
- rustup target add --toolchain nightly x86_64-fortanix-unknown-sgx
3533
- ./ct.sh

ct.sh

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,28 @@
22
set -ex
33
cd "$(dirname "$0")"
44

5-
if [ "${TRAVIS_BRANCH}" = "staging" ];
6-
then
7-
rm -rf ./target
8-
fi
9-
105
cd "./mbedtls"
116

12-
cargo test
13-
cargo test --features spin_threading
14-
cargo test --features rust_threading
15-
cargo test --features zlib
16-
cargo test --features pkcs12
17-
cargo test --features pkcs12_rc2
18-
cargo test --features force_aesni_support
19-
cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand,time,custom_time,custom_gmtime_r
20-
cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand
21-
cargo +nightly test --no-run --target=x86_64-fortanix-unknown-sgx --features=sgx --no-default-features
7+
if [ $TOOLCHAIN = "stable" ] || [ $TOOLCHAIN = "beta" ]; then
8+
9+
rustup toolchain add $TOOLCHAIN
10+
rustup default $TOOLCHAIN
11+
cargo test
12+
cargo test --features spin_threading
13+
cargo test --features rust_threading
14+
cargo test --features zlib
15+
cargo test --features pkcs12
16+
cargo test --features pkcs12_rc2
17+
cargo test --features force_aesni_support
18+
19+
elif [ $TOOLCHAIN = "coreio_nightly" ]; then
20+
21+
rustup toolchain add $CORE_IO_NIGHTLY
22+
cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand,time,custom_time,custom_gmtime_r
23+
cargo +$CORE_IO_NIGHTLY test --no-default-features --features core_io,rdrand
24+
25+
elif [ $TOOLCHAIN = "sgx" ]; then
26+
rustup toolchain add nightly
27+
cargo +nightly test --no-run --target=x86_64-fortanix-unknown-sgx --features=sgx --no-default-features
28+
29+
fi

0 commit comments

Comments
 (0)