summaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-08-22 12:44:15 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-08-23 12:45:25 +0200
commit35c4ce33485d827cfdb62c4b6c63a35a60509ed8 (patch)
tree43d0c213f3d512c4d48fa622852942f14905978f /.travis.yml
parentc434e1cd293a22d45ff8575810b4a770ac2cce08 (diff)
Let the travis gem format the .travis.yml file
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml141
1 files changed, 66 insertions, 75 deletions
diff --git a/.travis.yml b/.travis.yml
index eb958037..1fdc0224 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,92 +1,83 @@
sudo: false
language: rust
rust:
- - beta
- - nightly
- - stable
-
+- beta
+- nightly
+- stable
cache: cargo
-
matrix:
- allow_failures:
- - rust: nightly
- - rust: beta
-
+ allow_failures:
+ - rust: nightly
+ - rust: beta
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
-
+- |
+ 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
before_script:
- - |
- pip install 'travis-cargo<0.2' --user &&
- export PATH=$HOME/.local/bin:$PATH
-
+- |
+ 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" &&
- {
- {
- if [[ $(echo "$1" | grep lib) ]]; then
- travis-cargo -q test
- else
- travis-cargo -q build
- fi
- } &&
- cd -
- } || exit 1
- }
+- |
+ travis_cargo_run_in() {
+ echo ":: Trying to run cargo in $1"
+ [[ -d "$1" ]] &&
+ cd "$1" &&
+ {
+ {
+ if [[ $(echo "$1" | grep lib) ]]; then
+ travis-cargo -q test
+ else
+ travis-cargo -q build
+ fi
+ } &&
+ 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"
- }
+ 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
+ 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
addons:
- apt:
- packages:
- - libcurl4-openssl-dev
- - libelf-dev
- - libdw-dev
-
+ apt:
+ packages:
+ - libcurl4-openssl-dev
+ - libelf-dev
+ - libdw-dev
after_success:
- - travis-cargo --only stable doc-upload
-
+- travis-cargo --only stable doc-upload
notifications:
- email:
- on_success: never
- irc:
- channels:
- - "chat.freenode.net#imag"
- template:
- - "%{repository_name} (%{branch} @ %{commit} by %{author}): %{result}"
-
+ email:
+ on_success: never
+ irc:
+ channels:
+ - chat.freenode.net#imag
+ template:
+ - "%{repository_name} (%{branch} @ %{commit} by %{author}): %{result}"
env:
global:
- TRAVIS_CARGO_NIGHTLY_FEATURE=dev