imag/.travis.yml

89 lines
2.2 KiB
YAML
Raw Normal View History

2015-12-29 13:51:26 +00:00
sudo: false
language: rust
rust:
- beta
- nightly
- stable
2016-04-29 11:52:50 +00:00
cache: cargo
2015-12-29 13:51:26 +00:00
matrix:
allow_failures:
- rust: nightly
before_install:
- |
c=$(git diff $(git merge-base master $TRAVIS_COMMIT)..$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:
- |
travis_cargo_run_in() {
echo ":: Trying to run cargo in $1"
[[ -d "$1" ]] &&
cd "$1" &&
{
travis-cargo -q build &&
travis-cargo -q test &&
travis-cargo -q bench &&
travis-cargo --only stable doc &&
cd -
} || exit 1
}
run_sh_test() {
echo "--- Running test script: '$1'"
bash $1 || { echo "--- Test failed. Exiting"; exit 1; }
echo "--- Test script $1 executed successfully"
}
echo "<< Changes in ./doc are not build by CI >>"
for d in $(find -name "Cargo.toml" | grep -vE "^./Cargo.toml$"); do
echo ":: Working on $d"
dir=$(dirname $d)
{ \
echo -e "\n--- Running in $d ---\n" && \
travis_cargo_run_in $dir && \
echo "--- Running test scripts ---" && \
for testsh in $(find $dir -iname "*test.sh"); do
run_sh_test $testsh
done && \
echo -e "--- Done with test scripts ---\n\n"
} || true
done
2016-01-16 19:33:20 +00:00
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
notifications:
email:
on_success: never
2016-08-01 07:44:47 +00:00
irc:
channels:
- "chat.freenode.net#imag"
template:
- "%{repository_name} (%{branch} @ %{commit} by %{author}): %{result}"
2015-12-29 13:51:26 +00:00
env:
global:
- TRAVIS_CARGO_NIGHTLY_FEATURE=dev