servatrice/travis-compile.sh
tooomm 1565309146 enable caching for ci (#2799)
* enable cache

* caching on mac

* fix ci caching on mac

* fix

* add mac cache

* added homebrew cache and pretty print yaml (+ structural ordering)

* cleanup

* fix ccache on mac

* testing workaround

https://github.com/travis-ci/travis-ci/issues/7456#issuecomment-296505058

* try xcode7.3 instead of workaround

* cache timout value

more time for cache to upload
2017-07-07 16:17:18 +02:00

26 lines
641 B
Bash
Executable file

#!/bin/bash
set -e
./servatrice/check_schema_version.sh
mkdir -p build
cd build
prefix=""
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
export PATH="/usr/local/opt/ccache/libexec:$PATH"
prefix="-DCMAKE_PREFIX_PATH=$(echo /usr/local/opt/qt*/)"
fi
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
prefix="-DCMAKE_PREFIX_PATH=$(echo /opt/qt5*/lib/cmake/)"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(echo /opt/qt5*/lib/)"
fi
if [[ $BUILDTYPE == "Debug" ]]; then
cmake .. -DWITH_SERVER=1 -DTEST=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix
make -j2
make test
else
cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix
make package -j2
fi