2015-12-29 13:51:26 +00:00
|
|
|
sudo: false
|
|
|
|
language: rust
|
|
|
|
rust:
|
|
|
|
- beta
|
|
|
|
- nightly
|
|
|
|
- stable
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- rust: nightly
|
2016-01-14 11:03:25 +00:00
|
|
|
|
|
|
|
before_install:
|
|
|
|
- |
|
|
|
|
c=$(git diff $TRAVIS_BRANCH..$TRAVIS_COMMIT --name-only | cut -d "/" -f 1 | uniq)
|
|
|
|
if [[ "$c" == "doc" ]]; then
|
|
|
|
echo "Only changes in DOC, exiting 0"
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
echo "Changes in other directories than ./doc"
|
|
|
|
echo "continue build..."
|
|
|
|
fi
|
2015-12-29 13:51:26 +00:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
- |
|
|
|
|
pip install 'travis-cargo<0.2' --user &&
|
|
|
|
export PATH=$HOME/.local/bin:$PATH
|
|
|
|
|
|
|
|
script:
|
|
|
|
- |
|
2016-01-09 22:55:44 +00:00
|
|
|
changes_in() {
|
|
|
|
[[ $(git diff --name-only $TRAVIS_BRANCH..$TRAVIS_COMMIT | \
|
|
|
|
cut -d "/" -f 1 | \
|
|
|
|
grep "$n") ]] > /dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
travis_cargo_run_in() {
|
|
|
|
[[ -d "$1" ]] &&
|
|
|
|
cd "$1" &&
|
2016-01-08 10:25:45 +00:00
|
|
|
travis-cargo build &&
|
|
|
|
travis-cargo test &&
|
|
|
|
travis-cargo bench &&
|
2016-01-09 22:55:44 +00:00
|
|
|
travis-cargo --only stable doc &&
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
|
|
|
|
[[ $(changes_in "doc") ]] && echo "Changes in ./doc are not build by CI"
|
2016-01-10 16:04:19 +00:00
|
|
|
travis_cargo_run_in "."
|
2015-12-29 13:51:26 +00:00
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libcurl4-openssl-dev
|
|
|
|
- libelf-dev
|
|
|
|
- libdw-dev
|
|
|
|
|
|
|
|
after_success:
|
|
|
|
- travis-cargo --only stable doc-upload
|
|
|
|
- travis-cargo coveralls --no-sudo
|
|
|
|
|
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: never
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- TRAVIS_CARGO_NIGHTLY_FEATURE=dev
|