ddnet/.travis.yml
Dennis Felsing 070d215ae0 Fix Travis Mac OSX build
ABI check failed, CMAKE_SIZEOF_VOID_P was thus not set and we look for
libs in wrong directory. Something seems to be wrong with the C/C++
compilers Travis is using. Not sure how to figure out more closely.
2019-12-30 13:19:33 +01:00

38 lines
1.2 KiB
YAML

language: c++
sudo: false
dist: trusty
os:
- linux
- osx
addons:
apt:
packages:
- libfreetype6-dev
- libgtest-dev
- libsdl2-dev
script:
- python scripts/check_header_guards.py
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_EXTRA_ARGS="-DDOWNLOAD_GTEST=ON -DDEV=ON"; 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 -DCMAKE_INSTALL_PREFIX=/usr $CMAKE_EXTRA_ARGS ..
- cat CMakeFiles/CMakeError.log
- cat CMakeFiles/CMakeOutput.log
- make everything
- make run_tests
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then make DESTDIR=install install; test -x install/bin/DDNet; test -x install/bin/DDNet-Server; test -d install/bin/data; test -d install/usr/lib; fi
- make package_default
- cd ..; mkdir build_debug; cd build_debug
- cmake -Werror=dev -DCMAKE_BUILD_TYPE=Debug $CMAKE_EXTRA_ARGS ..
- make run_tests
- cd ..
- build/DDNet-Server shutdown
env:
global:
- CFLAGS="-Wdeclaration-after-statement -Werror"
- CXXFLAGS="-Werror"
branches:
except:
- staging.tmp
- testing.tmp