From 39e5aacfb58290c2ca21f3204f61df8d45df5130 Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Mon, 27 Aug 2018 17:11:33 -0400 Subject: [PATCH] Move this to the before_script phase The build cache gets stored after the `script` phase, but before the `after_success`/`after_failure` phase, so the built cargo-tarpaulin wasn't getting cached --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cf0f604..5093fea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,15 +22,16 @@ rust: before_script: - | if [[ "$TRAVIS_RUST_VERSION" == "nightly"* ]]; then rustup component add rustfmt-preview; fi + - | + if [[ "$TRAVIS_RUST_VERSION" == stable ]] 2> /dev/null && [ -z "$ELEFREN_FEATURES" ] 2>/dev/null && [[ "$TRAVIS_OS_NAME" == "linux" ]] 2>/dev/null && [[ -z "$(which cargo-tarpaulin)" ]]; then + RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin + fi script: - | if [[ "$TRAVIS_RUST_VERSION" == "nightly"* ]]; then cargo fmt --all -- --check; fi - cargo test $ELEFREN_FEATURES after_success: | if [[ "$TRAVIS_RUST_VERSION" == stable ]] 2> /dev/null && [ -z "$ELEFREN_FEATURES" ] 2>/dev/null && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - if [[ -z "$(which cargo-tarpaulin)" ]]; then - RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin - fi cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID --features toml fi matrix: