gnucash/util/ci/commonbuild
lmat 121dd8cf90 Configure travis to use docker for CI
Currently, there is an ubuntu 14.04 and archlinux build and they both
use cmake with ninja, cmake with make, and autotools to build. It should
be straightforward to add another configuration.

Travis checks out the correct branch of the source code for us, and we
expose that source code to the docker container using a docker run
"volume".
2017-09-09 09:56:34 -04:00

26 lines
613 B
Bash

#!/bin/bash -e
mkdir build;
cd build;
export TZ="America/Los_Angeles";
mkdir -p /root/.local/share;
if [[ "$BUILDTYPE" == "cmake-make" ]]; then
cmake ../gnucash
make -j 4;
make check || ../afterfailure;
elif [[ "$BUILDTYPE" == "cmake-ninja" ]]; then
cmake ../gnucash -DCMAKE_BUILD_TYPE=debug -DENABLE_DEBUG=on -G Ninja
ninja
ninja check || ../afterfailure;
elif [[ "$BUILDTYPE" == "autotools" ]]; then
../gnucash/autogen.sh;
../gnucash/configure --enable-python;
make;
make check || ../afterfailure;
else
echo "Unknown buildtype: \"$BUILDTYPE\". Not building.";
fi