Skip to content

Commit

Permalink
Setup Travis-CI (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbe72 authored May 17, 2018
1 parent f1fa9aa commit 4db2331
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 55 deletions.
110 changes: 57 additions & 53 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,73 +11,77 @@ matrix:
- os: osx

include:

# Linux C++14
- os: linux
addons: &gcc7
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE=Debug STD=14 EXCEPTIONS=ON INT128=OFF
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE=Debug STD=14 EXCEPTIONS=OFF INT128=OFF

- os: linux
addons: &gcc6
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" BUILD_TYPE=Release STD=14 EXCEPTIONS=ON INT128=ON

- os: linux
addons: &gcc5
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" BUILD_TYPE=Debug STD=14 EXCEPTIONS=OFF INT128=ON

- os: linux
addons: &clang5
apt:
sources:
- llvm-toolchain-trusty-5.0
- ubuntu-toolchain-r-test
packages:
- clang-5.0
env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0" BUILD_TYPE=Release STD=14 EXCEPTIONS=ON INT128=ON

# - 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
- os: linux
addons: &clang4
apt:
sources:
- llvm-toolchain-trusty-4.0
- ubuntu-toolchain-r-test
packages:
- clang-4.0
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
- os: linux
addons: *gcc7
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE=Release STD=17 EXCEPTIONS=ON 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: linux
addons: *gcc6
env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" BUILD_TYPE=Debug STD=17 EXCEPTIONS=ON INT128=ON

#OSX C++14
- 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
env: MATRIX_EVAL="" BUILD_TYPE=Release STD=14 EXCEPTIONS=OFF 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: xcode8
env: MATRIX_EVAL="brew update && brew install gcc@7 && CC=gcc-7 && CXX=g++-7" BUILD_TYPE=Release STD=17 EXCEPTIONS=OFF 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
- os: osx
osx_image: xcode8
env: MATRIX_EVAL="brew update && brew install gcc@7 && CC=gcc-7 && CXX=g++-7" BUILD_TYPE=Release STD=17 EXCEPTIONS=OFF INT128=OFF

before_install:
- eval "${MATRIX_EVAL}"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ExternalProject_Add(
GIT_SHALLOW 1
GIT_PROGRESS 1
UPDATE_COMMAND ""
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${Cnl_DESTDIR}"
CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_INSTALL_PREFIX=${Cnl_DESTDIR}
)

# runs a suite of compile-time tests using `static_assert`
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ExternalProject_Add(
URL_MD5 "06ac495303fbe94b198026e3c196425e"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
CMAKE_ARGS -Dgtest_force_shared_crt=ON
CMAKE_ARGS -Dgtest_force_shared_crt=ON -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
)

######################################################################
Expand Down

0 comments on commit 4db2331

Please sign in to comment.