ddnet/.travis.yml
bors[bot] 138492a94a Merge #894
894: Add a flag `-DDOWNLOAD_GTEST` to automatically download and build GTest r=Learath2 a=heinrich5991

Enable tests on Circle CI, macOS on Travis and Appveyor.
2017-10-15 19:44:22 +00:00

32 lines
906 B
YAML

language: c++
sudo: false
dist: trusty
os:
- linux
- osx
addons:
apt:
packages:
- libfreetype6-dev
- libgtest-dev
- libsdl2-dev
script:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_EXTRA_ARGS="-DDOWNLOAD_GTEST=ON"; brew update; brew install sdl2; fi
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then CMAKE_EXTRA_ARGS="-DGTEST_LIBRARY=../gtest_build/libgtest.a -DGTEST_MAIN_LIBRARY=../gtest_build/libgtest_main.a"; mkdir gtest_build; cmake -E chdir gtest_build cmake /usr/src/gtest; cmake --build gtest_build; fi
- mkdir build; cd build
- cmake -Werror=dev $CMAKE_EXTRA_ARGS ..
- make everything
- make run_tests
- make package_default
- cd ..; mkdir build_debug; cd build_debug
- cmake -Werror=dev -DCMAKE_BUILD_TYPE=Debug $CMAKE_EXTRA_ARGS ..
- make run_tests
- cd ..
env:
global:
- CFLAGS="-Wdeclaration-after-statement -Werror"
- CXXFLAGS="-Werror"
branches:
except:
- staging.tmp