blob: 9f1d4bbd5463574cea7ca19a4e784bfd61b4772a [file] [log] [blame]
Kostace441a92013-08-05 12:40:33 +02001language: cpp
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +02002sudo: false
Kostace441a92013-08-05 12:40:33 +02003
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +02004cache:
5 ccache: true
6 directories:
7 - $HOME/.ccache
Kostace441a92013-08-05 12:40:33 +02008
9env:
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +020010 global:
11 - USE_CCACHE=1
12 - CCACHE_COMPRESS=1
13 - CCACHE_MAXSIZE=200M
14 - CCACHE_CPP2=1
15
16
17matrix:
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. Hofmann1706dd42016-05-07 18:54:46 +020067 sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test']
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +020068 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 Nash1c9a6ca2016-09-27 11:20:33 +0100122 osx_image: xcode7
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +0200123 compiler: clang
124 env: COMPILER='ccache clang++' BUILD_TYPE='Debug'
125
126 - os: osx
Phil Nash1c9a6ca2016-09-27 11:20:33 +0100127 osx_image: xcode7
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +0200128 compiler: clang
129 env: COMPILER='ccache clang++' BUILD_TYPE='Release'
130
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +0200131 - os: osx
Phil Nash1c9a6ca2016-09-27 11:20:33 +0100132 osx_image: xcode8
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +0200133 compiler: clang
134 env: COMPILER='ccache clang++' BUILD_TYPE='Debug'
135
136 - os: osx
Phil Nash1c9a6ca2016-09-27 11:20:33 +0100137 osx_image: xcode8
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +0200138 compiler: clang
139 env: COMPILER='ccache clang++' BUILD_TYPE='Release'
140
Kostace441a92013-08-05 12:40:33 +0200141
142install:
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +0200143 - 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. Coefd7d3542016-09-24 19:38:43 +0100151 which cmake || brew install cmake
152 which ccache || brew install ccache
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +0200153 fi
154
155before_script:
156 - export CXX=${COMPILER}
157 - cd ${TRAVIS_BUILD_DIR}
Martin Hořeňovský99cdc622017-01-15 22:08:12 +0100158 - cmake -H. -BBuild -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -Wdev
Kostace441a92013-08-05 12:40:33 +0200159 - cd Build
Kostace441a92013-08-05 12:40:33 +0200160
161script:
Daniel J. Hofmanne904aa72015-10-06 12:28:18 +0200162 - make -j 2
163 - ctest -V -j 2