Travis: Fail only if there are failed {builds, tests, benchs}
This commit is contained in:
parent
1a61e8b1d5
commit
3464028267
1 changed files with 12 additions and 8 deletions
20
.travis.yml
20
.travis.yml
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue