Add matrix configuration to travis file

This commit is contained in:
Daniel Butum 2015-11-09 00:59:47 +02:00
parent 0b5fdb6729
commit 28394c36b1

View File

@ -3,44 +3,45 @@
# Configuration manual: # Configuration manual:
# http://docs.travis-ci.com/user/build-configuration/ # http://docs.travis-ci.com/user/build-configuration/
# #
sudo: false
language: cpp language: cpp
compiler: compiler:
- gcc - gcc
# - clang - clang
#branches:
# only: matrix:
# - master fast_finish: true
before_install:
# Update repos env:
- sudo apt-get update -qq matrix:
# Install dependencies - BUILD_TYPE="Debug"
- sudo apt-get install build-essential libogg-dev libvorbis-dev libopenal-dev libxxf86vm-dev libcurl4-openssl-dev libfribidi-dev libbluetooth-dev - BUILD_TYPE="Release"
# Install mesa from an other repo (a newer version is required). Quantal is not supported anymore, saucy is only supported till July 2014,
# so we try to use trusty (precise which is what traiv uses a too old mesa version which doesn't link) addons:
- sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu trusty main restricted" apt:
- sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 packages:
- sudo apt-get update -qq - build-essential
- sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libglew-dev cmake - libogg-dev
- libvorbis-dev
- libopenal-dev
- libxxf86vm-dev
- libcurl4-openssl-dev
- libfribidi-dev
- libbluetooth-dev
- libgl1-mesa-dev
- libglu1-mesa-dev
- libglew-dev
- cmake
before_script: before_script:
- export THREADS=`nproc` - export THREADS=$((`nproc` + 1))
# Unfortunately using all threads crashes g++: "g++: internal compiler error: Killed (program cc1plus)"
- export THREADS=4
- echo "THREADS = $THREADS" - echo "THREADS = $THREADS"
- free -mt
script: script:
- mkdir "build"
# First a debug build: - cd "build"
- mkdir build-debug - cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCHECK_ASSETS=off
- cd build-debug
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DCHECK_ASSETS=off
- make VERBOSE=1 -j $THREADS
# Then a release build:
- cd ..
- mkdir build-release
- cd build-release
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCHECK_ASSETS=off
- make VERBOSE=1 -j $THREADS - make VERBOSE=1 -j $THREADS
notifications: notifications: