Skip to content

Commit

Permalink
Integrated with Travis-CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hbe72 committed May 17, 2018
1 parent 84faef0 commit 6d2308c
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .travis-setup-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# Before install
sudo add-apt-repository -y ppa:kalakris/cmake
sudo apt-get update -qq

# remove GCC-4.x
sudo apt remove gcc

# Install
sudo apt-get install -qq cmake
cmake --version

# Ubuntu 14.04 defaults to Boost v54 which doesn't work without RTTI
if [[ "$EXCEPTIONS" == "ON" ]]; then
sudo apt-get install -qq libboost-dev
fi
84 changes: 84 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
dist: trusty
sudo: required

language: cpp

matrix:
# Don't rely on OSX jobs succeeding before approving a build:
# they are too slow to start and rarely flag an issue.
fast_finish: true
allow_failures:
- os: osx

include:

# Linux C++14
- os: linux
addons: *gcc7
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE=Debug STD=14 EXCEPTIONS=ON INT128=OFF

- os: linux
addons: *gcc6
env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" BUILD_TYPE=Release STD=14 EXCEPTIONS=ON INT128=ON

- os: linux
addons: *gcc5
env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" BUILD_TYPE=Debug STD=14 EXCEPTIONS=OFF INT128=ON

- os: linux
addons: *clang5
env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0" BUILD_TYPE=Release STD=14 EXCEPTIONS=ON INT128=ON

- os: linux
addons: *clang4
env: MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0" BUILD_TYPE=Debug STD=14 EXCEPTIONS=ON INT128=ON

# Linux C++17
- os: linux
addons: *gcc7
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE=Release STD=17 EXCEPTIONS=ON INT128=ON

- os: linux
addons: *gcc6
env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" BUILD_TYPE=Debug STD=17 EXCEPTIONS=ON INT128=ON

- os: linux
addons: *gcc5
env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" BUILD_TYPE=Release STD=17 EXCEPTIONS=OFF INT128=ON

- os: linux
addons: *clang5
env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0" BUILD_TYPE=Debug STD=17 EXCEPTIONS=OFF INT128=ON

- os: linux
addons: *clang4
env: MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0" BUILD_TYPE=Release STD=17 EXCEPTIONS=OFF INT128=ON

#OSX C++14
- os: osx
osx_image: xcode9.3
env: MATRIX_EVAL="brew update && brew install gcc6 && CC=gcc-6 && CXX=g++-6" BUILD_TYPE=Release STD=14 EXCEPTIONS=ON INT128=ON

- os: osx
osx_image: xcode9.3
compiler: clang #Apple LLVM version 9.1.0
env: MATRIX_EVAL="" BUILD_TYPE=Release STD=14 EXCEPTIONS=ON INT128=ON

#OSX C++17
- os: osx
osx_image: xcode9.3
env: MATRIX_EVAL="brew update && brew install gcc6 && CC=gcc-6 && CXX=g++-6" BUILD_TYPE=Release STD=17 EXCEPTIONS=ON INT128=ON

- os: osx
osx_image: xcode9.3
compiler: clang #Apple LLVM version 9.1.0
env: MATRIX_EVAL="" BUILD_TYPE=Release STD=17 EXCEPTIONS=ON INT128=ON

before_install:
- eval "${MATRIX_EVAL}"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source .travis-setup-linux.sh ; fi

script:
- cmake -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DSTD="${STD}" -DEXCEPTIONS="${EXCEPTIONS}" -DINT128="${INT128}"
- cmake --build . -- -j 8 Tests
- ctest

0 comments on commit 6d2308c

Please sign in to comment.