Travis: Fail only if there are failed {builds, tests, benchs}

This commit is contained in:
Matthias Beyer 2016-02-07 01:34:50 +01:00
parent 1a61e8b1d5
commit 3464028267

View file

@ -36,20 +36,24 @@ script:
travis_cargo_run_in() { travis_cargo_run_in() {
[[ -d "$1" ]] && [[ -d "$1" ]] &&
cd "$1" && cd "$1" &&
travis-cargo build && {
travis-cargo test && travis-cargo build &&
travis-cargo bench && travis-cargo test &&
travis-cargo --only stable doc && travis-cargo bench &&
cd - travis-cargo --only stable doc &&
cd -
} || exit 1
} }
[[ $(changes_in "doc") ]] && echo "Changes in ./doc are not build by CI" [[ $(changes_in "doc") ]] && echo "Changes in ./doc are not build by CI"
for d in $(find -name "Cargo.toml" | grep -vE "^.$"); do for d in $(find -name "Cargo.toml" | grep -vE "^.$"); do
dir=$(dirname $d) dir=$(dirname $d)
changes_in $dir && \ {
echo -e "\nRunning in $d\n" && \ changes_in $dir && \
travis_cargo_run_in $dir echo -e "\nRunning in $d\n" && \
travis_cargo_run_in $dir
} || true
done done
addons: addons: