travis: Only build changes if there are changes outside of ./doc

This commit is contained in:
Matthias Beyer 2016-01-08 11:25:45 +01:00
parent 3ea9721184
commit 8d4bb2a88b

View file

@ -16,10 +16,14 @@ before_script:
script: script:
- | - |
travis-cargo build && if [[ "doc" == $(git diff --name-only $TRAVIS_BRANCH..$TRAVIS_COMMIT | cut -d "/" -f 1 | uniq) ]]; then
travis-cargo test && echo "There are only changes in the ./doc directory... not doing anything"
travis-cargo bench && else
travis-cargo --only stable doc travis-cargo build &&
travis-cargo test &&
travis-cargo bench &&
travis-cargo --only stable doc
fi
addons: addons:
apt: apt: