From 09a5e80472641d304ad7784d13671be22e11f667 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 23 Oct 2019 02:46:11 +0200 Subject: [PATCH] travis: Only run cargo-audit on stable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … since there's no benefit in running it multiple times and cargo-audit can't be built with older versions of rustc (at the time of writing, cargo-audit has a minimum rustc version of 1.36.0) --- .travis.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index e8a1ae34..9a5d4568 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,16 +6,22 @@ rust: - beta before_script: - - "rustup component add rustfmt" - - "rustup component add clippy" - - "cargo install --force cargo-audit" - - "cargo generate-lockfile" + - rustup component add rustfmt + - rustup component add clippy + - | + if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then + cargo install --force cargo-audit + fi + - cargo generate-lockfile script: - - "cargo audit" - - "cargo fmt --all -- --check" - - "cargo clippy --all --all-targets --all-features -- -D warnings" - - "cargo build --all --verbose" - - "cargo test --all --verbose" + - | + if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then + cargo audit + fi + - cargo fmt --all -- --check + - cargo clippy --all --all-targets --all-features -- -D warnings + - cargo build --all --verbose + - cargo test --all --verbose if: "type != push OR (tag IS blank AND branch = master)" notifications: email: false