summaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-09-09 17:07:29 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-09-09 20:15:17 +0200
commit797ea9e8526e27f6b79f64275d750cd3e3e60535 (patch)
tree67aa5d17fdc31dc51bf3f6b63a86a1bd3cf61bdf /.travis.yml
parent9f1faf764f710ac837de8e0b32513e8a825d455a (diff)
travis: Use makefile for building things
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml46
1 files changed, 13 insertions, 33 deletions
diff --git a/.travis.yml b/.travis.yml
index 94325312..77478906 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,49 +20,29 @@ before_script:
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
- }
-
- 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 >>"
-
+ libs_to_test="$(find . -maxdepth 1 name "libimag*" -printf "test-%f ")"
+ bins_to_build="$(find . -maxdepth 1 name "imag-*" -printf "%f ")"
+ make $libs_to_test && \
+ make $bins_to_build && \
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"
+ echo "--- Running test scripts ---" && \
+ for testsh in $(find $dir -iname "*test.sh"); do
+ echo "--- Running test script: '$1'"
+ bash $1 || { echo "--- Test failed. Exiting"; exit 1; }
+ echo "--- Test script $1 executed successfully"
+ done && \
} || true
done
+
addons:
apt:
packages:
- libcurl4-openssl-dev
- - libelf-dev
- libdw-dev
+ - libelf-dev
+ - make
after_success:
- |
pushd .imag-documentation &&