From 801114a68df6dc0759e6e052fd37069060773b3a Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Wed, 20 Mar 2019 11:30:50 +0100 Subject: [PATCH] Only run clippy and rustfmt on CI if the component is available --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7758afb..b6dcb4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -129,16 +129,19 @@ matrix: - name: "rustfmt" install: true rust: nightly - before_script: rustup component add rustfmt-preview - script: cargo fmt --all -- --check + script: | + if rustup component add rustfmt-preview ; then + cargo fmt --all -- --check + fi - name: "clippy" install: true rust: nightly # allow(clippy::all) fails in the syscrate, so we can't use --all here: script: | - if rustup component add clippy-preview; then + if rustup component add clippy-preview ; then cargo clippy -p jemalloc-sys -- -D clippy::pedantic cargo clippy -p jemallocator -- -D clippy::pedantic + cargo clippy -p jemallocator-global -- -D clippy::pedantic cargo clippy -p jemalloc-ctl -- -D clippy::pedantic fi - name: "Shellcheck"