* add links to build image update history * remove cmake from apt * remove bc from apt * remove clang-format from apt * test clang-format * Revert "test clang-format" This reverts commit b2f12da4276095bbd7442d171c81479a3939e312. * remove protobuf from apt * Revert "remove protobuf from apt" This reverts commit 9162c8800c10b958e132aa0d68322fd03942660f. * remove qt from apt * test with versions which differ from what xenial provides * Revert "test with versions which differ from what xenial provides" This reverts commit 6192e581696d5493920dd08d4c142b1ba53cf5b0. * Revert "remove qt from apt" This reverts commit 0d9aff1c4c9bb19dd9da0b41769f4fad197046cc. * conditions v1 are the default now https://blog.travis-ci.com/2018-07-18-build-stages-officially-released * add new job names https://docs.travis-ci.com/user/customizing-the-build/?utm_source=blog&utm_medium=web&utm_campaign=build_stages_ga#Naming-Jobs-within-Matrices * disable mail * clang-format version * remove clang source * cmake version * macOS: remove clang-format formatting only checked on linux build * add compiler info * cmake version2 * remove fast_finish only useful if allowed failures are configured in the matrix: https://docs.travis-ci.com/user/customizing-the-build/#fast-finishing
59 lines
1.5 KiB
Bash
59 lines
1.5 KiB
Bash
#!/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/bin:$PATH"
|
|
prefix="-DCMAKE_PREFIX_PATH=$(echo /usr/local/opt/qt5/)"
|
|
fi
|
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
|
prefix="-DCMAKE_PREFIX_PATH=$(echo /opt/qt5*/lib/cmake/)"
|
|
fi
|
|
|
|
cmake --version
|
|
|
|
if [[ $BUILDTYPE == "Debug" ]]; then
|
|
cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix -DTEST=1
|
|
make -j2
|
|
make test
|
|
|
|
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
|
make install
|
|
fi
|
|
|
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
|
cd ..
|
|
clang-format -version
|
|
clang-format -i \
|
|
common/*.h \
|
|
common/*.cpp \
|
|
cockatrice/src/*.h \
|
|
cockatrice/src/*.cpp \
|
|
oracle/src/*.h \
|
|
oracle/src/*.cpp \
|
|
servatrice/src/*.h \
|
|
servatrice/src/*.cpp
|
|
|
|
git clean -f
|
|
git diff --quiet || (
|
|
echo "*****************************************************";
|
|
echo "*** This PR is not clean against our code style ***";
|
|
echo "*** Run clang-format and fix up any differences ***";
|
|
echo "*** Check our CONTRIBUTING.md file for details! ***";
|
|
echo "*** Thank you ♥ ***";
|
|
echo "*****************************************************";
|
|
)
|
|
git diff --exit-code
|
|
fi
|
|
fi
|
|
|
|
if [[ $BUILDTYPE == "Release" ]]; then
|
|
cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=$BUILDTYPE $prefix
|
|
make package -j2
|
|
fi
|