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
1 changed files with 12 additions and 8 deletions

View File

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