Kosta | ce441a9 | 2013-08-05 12:40:33 +0200 | [diff] [blame] | 1 | language: cpp |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 2 | sudo: false |
Kosta | ce441a9 | 2013-08-05 12:40:33 +0200 | [diff] [blame] | 3 | |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 4 | cache: |
| 5 | ccache: true |
| 6 | directories: |
| 7 | - $HOME/.ccache |
Kosta | ce441a9 | 2013-08-05 12:40:33 +0200 | [diff] [blame] | 8 | |
| 9 | env: |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 10 | global: |
| 11 | - USE_CCACHE=1 |
| 12 | - CCACHE_COMPRESS=1 |
| 13 | - CCACHE_MAXSIZE=200M |
| 14 | - CCACHE_CPP2=1 |
| 15 | |
| 16 | |
| 17 | matrix: |
| 18 | include: |
| 19 | |
| 20 | # 1/ Linux Clang Builds |
| 21 | - os: linux |
| 22 | compiler: clang |
| 23 | addons: &clang35 |
| 24 | apt: |
| 25 | sources: ['llvm-toolchain-precise-3.5', 'ubuntu-toolchain-r-test'] |
| 26 | packages: ['clang-3.5'] |
| 27 | env: COMPILER='ccache clang++-3.5' BUILD_TYPE='Release' |
| 28 | |
| 29 | - os: linux |
| 30 | compiler: clang |
| 31 | addons: *clang35 |
| 32 | env: COMPILER='ccache clang++-3.5' BUILD_TYPE='Debug' |
| 33 | |
| 34 | |
| 35 | - os: linux |
| 36 | compiler: clang |
| 37 | addons: &clang36 |
| 38 | apt: |
| 39 | sources: ['llvm-toolchain-precise-3.6', 'ubuntu-toolchain-r-test'] |
| 40 | packages: ['clang-3.6'] |
| 41 | env: COMPILER='ccache clang++-3.6' BUILD_TYPE='Release' |
| 42 | |
| 43 | - os: linux |
| 44 | compiler: clang |
| 45 | addons: *clang36 |
| 46 | env: COMPILER='ccache clang++-3.6' BUILD_TYPE='Debug' |
| 47 | |
| 48 | |
| 49 | - os: linux |
| 50 | compiler: clang |
| 51 | addons: &clang37 |
| 52 | apt: |
| 53 | sources: ['llvm-toolchain-precise-3.7', 'ubuntu-toolchain-r-test'] |
| 54 | packages: ['clang-3.7'] |
| 55 | env: COMPILER='ccache clang++-3.7' BUILD_TYPE='Release' |
| 56 | |
| 57 | - os: linux |
| 58 | compiler: clang |
| 59 | addons: *clang37 |
| 60 | env: COMPILER='ccache clang++-3.7' BUILD_TYPE='Debug' |
| 61 | |
| 62 | |
| 63 | - os: linux |
| 64 | compiler: clang |
| 65 | addons: &clang38 |
| 66 | apt: |
Daniel J. Hofmann | 1706dd4 | 2016-05-07 18:54:46 +0200 | [diff] [blame] | 67 | sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test'] |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 68 | packages: ['clang-3.8'] |
| 69 | env: COMPILER='ccache clang++-3.8' BUILD_TYPE='Release' |
| 70 | |
| 71 | - os: linux |
| 72 | compiler: clang |
| 73 | addons: *clang38 |
| 74 | env: COMPILER='ccache clang++-3.8' BUILD_TYPE='Debug' |
| 75 | |
| 76 | |
| 77 | # 2/ Linux GCC Builds |
| 78 | - os: linux |
| 79 | compiler: gcc |
| 80 | addons: &gcc48 |
| 81 | apt: |
| 82 | sources: ['ubuntu-toolchain-r-test'] |
| 83 | packages: ['g++-4.8'] |
| 84 | env: COMPILER='ccache g++-4.8' BUILD_TYPE='Release' |
| 85 | |
| 86 | - os: linux |
| 87 | compiler: gcc |
| 88 | addons: *gcc48 |
| 89 | env: COMPILER='ccache g++-4.8' BUILD_TYPE='Debug' |
| 90 | |
| 91 | |
| 92 | - os: linux |
| 93 | compiler: gcc |
| 94 | addons: &gcc49 |
| 95 | apt: |
| 96 | sources: ['ubuntu-toolchain-r-test'] |
| 97 | packages: ['g++-4.9'] |
| 98 | env: COMPILER='ccache g++-4.9' BUILD_TYPE='Release' |
| 99 | |
| 100 | - os: linux |
| 101 | compiler: gcc |
| 102 | addons: *gcc49 |
| 103 | env: COMPILER='ccache g++-4.9' BUILD_TYPE='Debug' |
| 104 | |
| 105 | |
| 106 | - os: linux |
| 107 | compiler: gcc |
| 108 | addons: &gcc5 |
| 109 | apt: |
| 110 | sources: ['ubuntu-toolchain-r-test'] |
| 111 | packages: ['g++-5'] |
| 112 | env: COMPILER='ccache g++-5' BUILD_TYPE='Release' |
| 113 | |
| 114 | - os: linux |
| 115 | compiler: gcc |
| 116 | addons: *gcc5 |
| 117 | env: COMPILER='ccache g++-5' BUILD_TYPE='Debug' |
| 118 | |
| 119 | |
| 120 | # 3/ OSX Clang Builds |
| 121 | - os: osx |
Phil Nash | 1c9a6ca | 2016-09-27 11:20:33 +0100 | [diff] [blame] | 122 | osx_image: xcode7 |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 123 | compiler: clang |
| 124 | env: COMPILER='ccache clang++' BUILD_TYPE='Debug' |
| 125 | |
| 126 | - os: osx |
Phil Nash | 1c9a6ca | 2016-09-27 11:20:33 +0100 | [diff] [blame] | 127 | osx_image: xcode7 |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 128 | compiler: clang |
| 129 | env: COMPILER='ccache clang++' BUILD_TYPE='Release' |
| 130 | |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 131 | - os: osx |
Phil Nash | 1c9a6ca | 2016-09-27 11:20:33 +0100 | [diff] [blame] | 132 | osx_image: xcode8 |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 133 | compiler: clang |
| 134 | env: COMPILER='ccache clang++' BUILD_TYPE='Debug' |
| 135 | |
| 136 | - os: osx |
Phil Nash | 1c9a6ca | 2016-09-27 11:20:33 +0100 | [diff] [blame] | 137 | osx_image: xcode8 |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 138 | compiler: clang |
| 139 | env: COMPILER='ccache clang++' BUILD_TYPE='Release' |
| 140 | |
Kosta | ce441a9 | 2013-08-05 12:40:33 +0200 | [diff] [blame] | 141 | |
| 142 | install: |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 143 | - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" |
| 144 | - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR} |
| 145 | - | |
| 146 | if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then |
| 147 | CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz" |
| 148 | mkdir cmake && travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake |
| 149 | export PATH=${DEPS_DIR}/cmake/bin:${PATH} |
| 150 | elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then |
Jonathan B. Coe | fd7d354 | 2016-09-24 19:38:43 +0100 | [diff] [blame] | 151 | which cmake || brew install cmake |
| 152 | which ccache || brew install ccache |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 153 | fi |
| 154 | |
| 155 | before_script: |
| 156 | - export CXX=${COMPILER} |
| 157 | - cd ${TRAVIS_BUILD_DIR} |
Martin Hořeňovský | 99cdc62 | 2017-01-15 22:08:12 +0100 | [diff] [blame] | 158 | - cmake -H. -BBuild -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -Wdev |
Kosta | ce441a9 | 2013-08-05 12:40:33 +0200 | [diff] [blame] | 159 | - cd Build |
Kosta | ce441a9 | 2013-08-05 12:40:33 +0200 | [diff] [blame] | 160 | |
| 161 | script: |
Daniel J. Hofmann | e904aa7 | 2015-10-06 12:28:18 +0200 | [diff] [blame] | 162 | - make -j 2 |
| 163 | - ctest -V -j 2 |