Set up a build matrix on Travis CI

This will run the different builds in parallel (depending on
resource availability on Travis).

The advantages are
- faster test results
- easier to spot which build type has failed
- shorter test log per build type to parse
This commit is contained in:
Geert Janssens 2017-09-02 11:05:30 +02:00
parent 14b72ea11d
commit 0e0e4d294e

View File

@ -3,6 +3,10 @@ language: c
compiler:
- gcc
# - clang
env:
- BUILDTYPE=cmake-make
- BUILDTYPE=cmake-ninja
- BUILDTYPE=autotools
before_install:
- sudo apt-get update -qq
- sudo apt-get build-dep -qq gnucash
@ -13,6 +17,7 @@ script: |
set -ev
# First, do the cmake build using the default Makefile generator
if [[ "$BUILDTYPE" == "cmake-make" ]]; then
mkdir /tmp/gnucash-build-cmake-make
cd /tmp/gnucash-build-cmake-make
cmake $TRAVIS_BUILD_DIR
@ -20,6 +25,7 @@ script: |
make check
# Next, do cmake again, using the Ninja generator this time
elif [[ "$BUILDTYPE" == "cmake-ninja" ]]; then
mkdir /tmp/gnucash-build-cmake-ninja
cd /tmp/gnucash-build-cmake-ninja
cmake -G Ninja $TRAVIS_BUILD_DIR
@ -27,8 +33,10 @@ script: |
ninja check
# Finally, do the autotools build
elif [[ "$BUILDTYPE" == "autotools" ]]; then
cd $TRAVIS_BUILD_DIR
./autogen.sh
./configure
make
make check
fi