From 1226acc318e52be0ea33623e4cd772becbaf6c22 Mon Sep 17 00:00:00 2001 From: troido Date: Tue, 8 Jan 2019 14:12:25 +0100 Subject: [PATCH] travis test whether compilation works on mac and linux This checks both gcc and clang on linux, but only clang on mac Becuse there are so many debug warnings they are supressed in a very hacky way: Make is run first with error output ignored. Then an incremental build is run which has the error output, but will only build the files that errored the first time (and will error again). If anyone knows a better way to ignore the warnings that would be great. --- .travis.yml | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e5970686..72177bad3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,42 @@ language: cpp -compiler: - - clang - - gcc + +dist: xenial + +matrix: + include: + - os: osx + compiler: clang + env: if CXXFLAGS="-fgnu-inline-asm -fasm-blocks" + - os: linux + compiler: gcc + - os: linux + compiler: clang + +addons: + apt: + packages: + - build-essential + - nasm + - libogg-dev + - libxft-dev + - libx11-dev + - libxxf86vm-dev + - libopenal-dev + - libfreetype6-dev + - libxcursor-dev + - libxinerama-dev + - libxi-dev + - libxrandr-dev + - libxss-dev + - libglu1-mesa-dev + - libgtk-3-dev + +script: + - mkdir -p My\ Projects/TestProject/buildFiles/travis/ + - cd My\ Projects/TestProject/buildFiles/travis/ + - cmake ../../../.. -DTORQUE_APP_NAME=TestProject -DCMAKE_BUILD_TYPE=Debug + - make 2>/dev/null # Do the actual build, but ignore all the warnings + - make # build again. This time all output is printed but the warnings that happened earlier do not happen again + - make install + - cd ../../game/ + - ls