Merge pull request #730 from matthiasbeyer/travis-matrix-builds
Travis matrix builds
This commit is contained in:
commit
cb039b0841
1 changed files with 19 additions and 37 deletions
56
.travis.yml
56
.travis.yml
|
@ -20,49 +20,28 @@ before_script:
|
||||||
export PATH=$HOME/.local/bin:$PATH
|
export PATH=$HOME/.local/bin:$PATH
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
travis_cargo_run_in() {
|
if [[ "$TEST_SUITE" == "binaries" ]]; then
|
||||||
echo ":: Trying to run cargo in $1"
|
make $(find . -maxdepth 1 -name "imag-*" -type d -printf "%f ") && \
|
||||||
[[ -d "$1" ]] &&
|
for d in $(find -name "Cargo.toml" | grep -vE "^./Cargo.toml$"); do
|
||||||
cd "$1" &&
|
dir=$(dirname $d)
|
||||||
{
|
echo "--- Running test scripts ---"
|
||||||
{
|
for testsh in $(find $dir -iname "*test.sh"); do
|
||||||
if [[ $(echo "$1" | grep lib) ]]; then
|
echo "--- Running test script: '$testsh'"
|
||||||
travis-cargo -q test
|
bash $testsh || { echo "--- Test failed. Exiting"; exit 1; }
|
||||||
else
|
echo "--- Test script $testsh executed successfully"
|
||||||
travis-cargo -q build
|
done
|
||||||
fi
|
done
|
||||||
} &&
|
else # $TEST_SUITE == "libraries"
|
||||||
cd -
|
make $(find . -maxdepth 1 -name "libimag*" -printf "test-%f ")
|
||||||
} || exit 1
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- libcurl4-openssl-dev
|
- libcurl4-openssl-dev
|
||||||
- libelf-dev
|
|
||||||
- libdw-dev
|
- libdw-dev
|
||||||
|
- libelf-dev
|
||||||
|
- make
|
||||||
after_success:
|
after_success:
|
||||||
- |
|
- |
|
||||||
pushd .imag-documentation &&
|
pushd .imag-documentation &&
|
||||||
|
@ -78,6 +57,9 @@ notifications:
|
||||||
template:
|
template:
|
||||||
- "%{repository_name} (%{branch} @ %{commit} by %{author}): %{result}"
|
- "%{repository_name} (%{branch} @ %{commit} by %{author}): %{result}"
|
||||||
env:
|
env:
|
||||||
|
matrix:
|
||||||
|
- TEST_SUITE=binaries
|
||||||
|
- TEST_SUITE=libraries
|
||||||
global:
|
global:
|
||||||
- TRAVIS_CARGO_NIGHTLY_FEATURE=dev
|
- TRAVIS_CARGO_NIGHTLY_FEATURE=dev
|
||||||
- secure: D+3exBnbvzFvk7fvLOxkF7UotCc4gBbvvOW4xGr9u6dDjEjV5y6CdDy/OQAkhfKhvSou+lIC22g5MuCBQXFEf/ua7A1XzwBAFeVLK4cWZSa7+ql6LdHKqOg3oF6pQlh095WeWr8S2PYJFFJFg8RGUPnbjqdu1J4KSXqe/7GoZ3lYS69mx7D5Hb93KEN084/KGfBuvyJtMjO1fK3spltL2zV8oqegFpv0gLG5GY4LsJ/7ij4Mc6wepXSyyQbaiA1eKMMwQZDvoi4V1mCulo/jeC3pucGxvgnMV5DZs8aa8R7votltGvSpHCgU78LW19dg8oZqwShQQ+XUYw27H+QK5V1lz1l1MaJLbwS3ySyZBPGH8qUuOzQ3bLp9xhAIRgCui3kX/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