imag/.travis.yml

71 lines
1.6 KiB
YAML
Raw Normal View History

2015-12-29 13:51:26 +00:00
sudo: false
language: rust
rust:
- beta
- nightly
- stable
matrix:
allow_failures:
- rust: nightly
before_script:
- |
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$PATH
script:
- |
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" &&
travis-cargo build &&
travis-cargo test &&
travis-cargo bench &&
travis-cargo --only stable doc &&
cd -
}
if_changed_then_build_or_exit() {
if [[ $(changes_in "$1") ]]; then
echo "Changes in $1, building..."
travis_cargo_run_in "$1" || exit 1
else
echo "No changes in $1"
fi
}
[[ $(changes_in "doc") ]] && echo "Changes in ./doc are not build by CI"
if_changed_then_build_or_exit "libimagmodule"
if_changed_then_build_or_exit "libimagrt"
if_changed_then_build_or_exit "libimagstore"
if_changed_then_build_or_exit "libimagutil"
(changes_in "src" && travis_cargo_run_in ".") || true
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