Trying to optimize travis speeds

Cache cargo-web only
This commit is contained in:
Elichai Turkel 2019-08-12 14:49:08 -04:00
parent 288cc1e4ef
commit 6e58c8b623
1 changed files with 21 additions and 16 deletions

View File

@ -1,5 +1,7 @@
language: rust language: rust
cache: cargo cache:
directories:
- cargo_web
rust: rust:
- stable - stable
@ -10,31 +12,34 @@ os:
- linux - linux
- windows - windows
addons:
chrome: stable
matrix: matrix:
# rand 0.6 actually needs Rust 1.22, which leads to build failures on Rust 1.14 on Windows.
# This is a problem, because
# - we insist on rust 1.22 since #92
# - but "rand" is only an optional dependency.
exclude: exclude:
- rust: 1.22.0 - rust: 1.22.0
os: windows os: windows
script: script:
- cargo build --verbose --no-default-features
- cargo build --verbose --no-default-features --features="serde"
- cargo build --verbose --no-default-features --features="lowmemory"
- cargo build --verbose --no-default-features --features="rand"
- cargo build --verbose --no-default-features --features="rand serde recovery endomorphism"
- cargo build --verbose --no-default-features --features="fuzztarget recovery"
- cargo build --verbose --features=fuzztarget - cargo build --verbose --features=fuzztarget
- cargo build --verbose --features=rand - cargo build --verbose --features=rand
- cargo test --verbose --features=rand - cargo test --verbose --features=rand
- cargo test --verbose --features="rand serde" - cargo test --verbose --features="rand serde"
- cargo test --verbose --features="rand serde recovery endomorphism" - cargo test --verbose --features="rand serde recovery endomorphism"
- cargo build --verbose --no-default-features
- cargo build --verbose --no-default-features --features="serde"
- cargo build --verbose --no-default-features --features="rand"
- cargo build --verbose --no-default-features --features="rand serde recovery endomorphism"
- cargo build --verbose --no-default-features --features="fuzztarget recovery"
- cargo build --verbose --no-default-features --features="lowmemory"
- cargo build --verbose - cargo build --verbose
- cargo test --verbose - cargo test --verbose
- cargo build --release - cargo build --verbose --release
- cargo test --release - cargo test --verbose --release
- cargo bench - if [ ${TRAVIS_RUST_VERSION} == "stable" ]; then cargo doc --verbose --features="rand,serde,recovery,endomorphism"; fi
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cargo doc; fi - if [ ${TRAVIS_RUST_VERSION} == "nightly" ]; then cargo test --verbose --benches --features=unstable; fi
- if [ "$(rustup show | grep default | grep stable)" != "" -a "$TRAVIS_OS_NAME" = "linux" ]; then cargo install --force cargo-web && cargo web build --target=asmjs-unknown-emscripten && cargo web test --target=asmjs-unknown-emscripten --nodejs; fi - if [ ${TRAVIS_RUST_VERSION} == "stable" -a "$TRAVIS_OS_NAME" = "linux" ]; then
CARGO_TARGET_DIR=cargo_web cargo install --verbose --force cargo-web &&
cargo web build --verbose --target=asmjs-unknown-emscripten &&
cargo web test --verbose --target=asmjs-unknown-emscripten;
fi