Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Commit

Permalink
On Linux, build with GCC {4.9,5} and Clang 3.{6,7}
Browse files Browse the repository at this point in the history
This gives us full C++11 support and avoids a problem with Catch
framework (which we're going to use for testing):
catchorg/Catch2#334

The recipe was lifted from
http://genbattle.bitbucket.org/blog/2016/01/17/c++-travis-ci/
  • Loading branch information
Minoru committed May 16, 2016
1 parent 36de1ab commit 4e98df5
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 10 deletions.
56 changes: 49 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,56 @@
os:
- linux
- osx
language: cpp

matrix:
include:
- compiler: gcc
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env: COMPILER=g++-4.9
- compiler: gcc
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env: COMPILER=g++-5
- compiler: clang
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
packages:
- clang-3.6
env: COMPILER=clang++-3.6
- compiler: clang
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- clang-3.7
env: COMPILER=clang++-3.7
- compiler: gcc
os: osx
env: COMPILER=g++
- compiler: clang
os: osx
env: COMPILER=clang++

install:
- export CXX=$COMPILER
- cd ${TRAVIS_BUILD_DIR}
- ./travis-get-deps.sh
language: cpp
compiler:
- gcc
- clang

script:
- cd ${TRAVIS_BUILD_DIR}
Expand Down
4 changes: 1 addition & 3 deletions travis-get-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ case $TRAVIS_OS_NAME in
sudo apt-add-repository -y ppa:ondrej/php5
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -qq libsqlite3-dev libcurl4-openssl-dev libxml2-dev libstfl-dev libjson-c-dev libncursesw5-dev bc gcc-4.9 g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50
sudo apt-get install -qq libsqlite3-dev libcurl4-openssl-dev libxml2-dev libstfl-dev libjson-c-dev libncursesw5-dev bc
;;

"osx")
Expand Down

0 comments on commit 4e98df5

Please sign in to comment.