onqtam | e85b1bb | 2016-06-26 16:41:09 +0300 | [diff] [blame] | 1 | # this file is HEAVILY influenced by https://github.com/boostorg/hana/blob/master/.travis.yml |
| 2 | |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 3 | sudo: false |
| 4 | language: c++ |
| 5 | |
| 6 | notifications: |
onqtam | f516977 | 2016-09-09 18:33:13 +0300 | [diff] [blame] | 7 | email: false |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 8 | # gitter |
| 9 | webhooks: |
| 10 | urls: https://webhooks.gitter.im/e/10941dd1c67e5e967706 |
| 11 | on_success: change |
| 12 | on_failure: always |
| 13 | git: |
onqtam | 9f934f8 | 2016-08-02 12:42:19 +0300 | [diff] [blame] | 14 | depth: 500 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 15 | |
| 16 | # both apt and ccache make the builds slower... |
| 17 | #cache: |
| 18 | # - apt |
| 19 | # - ccache |
| 20 | |
| 21 | env: |
| 22 | global: |
| 23 | # - USE_CCACHE=1 |
| 24 | # - CCACHE_SLOPPINESS=pch_defines,time_macros |
| 25 | # - CCACHE_COMPRESS=1 |
| 26 | # - CCACHE_MAXSIZE=200M |
| 27 | # - CCACHE_CPP2=1 |
| 28 | - CMAKE_OPTIONS_GLOBAL="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" |
| 29 | # Workaround for https://github.com/travis-ci/travis-ci/issues/4681 |
| 30 | # "Defining the build matrix only with matrix.include leads to an additional, unwanted job" |
| 31 | matrix: |
| 32 | - TRAVIS_EMPTY_JOB_WORKAROUND=true |
| 33 | |
| 34 | addons: |
| 35 | coverity_scan: |
| 36 | # COVERITY_SCAN_TOKEN added as env var in travis project |
| 37 | project: |
| 38 | name: onqtam/doctest |
| 39 | notification_email: vik.kirilov@gmail.com |
| 40 | build_command_prepend: cd examples/hello_world && cmake . |
| 41 | build_command: make |
| 42 | branch_pattern: coverity_scan |
| 43 | # these apt sources will be referenced later (by using *name) |
| 44 | apt: |
onqtam | 2c8036f | 2016-06-26 17:12:42 +0300 | [diff] [blame] | 45 | sources: &apt_sources |
| 46 | - ubuntu-toolchain-r-test |
onqtam | 7e775f9 | 2016-11-15 02:41:10 +0200 | [diff] [blame] | 47 | - llvm-toolchain-precise |
onqtam | b382bd3 | 2016-08-01 20:53:56 +0300 | [diff] [blame] | 48 | - llvm-toolchain-precise-3.5 |
| 49 | - llvm-toolchain-precise-3.6 |
| 50 | - llvm-toolchain-precise-3.7 |
| 51 | - llvm-toolchain-precise-3.8 |
onqtam | fd62aa0 | 2016-11-15 03:00:44 +0200 | [diff] [blame] | 52 | - llvm-toolchain-precise-3.9 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 53 | |
| 54 | compiler: clang |
| 55 | os: linux |
| 56 | |
| 57 | matrix: |
| 58 | exclude: |
| 59 | - env: TRAVIS_EMPTY_JOB_WORKAROUND=true |
| 60 | |
| 61 | include: |
onqtam | d1737e4 | 2016-08-01 19:05:07 +0300 | [diff] [blame] | 62 | # coverage |
| 63 | - env: COMPILER=g++ COVERALLS_SERVICE_NAME=travis-ci |
| 64 | compiler: gcc |
| 65 | addons: |
| 66 | apt: |
| 67 | packages: ["lcov", "curl"] |
| 68 | |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 69 | # GCC 4.4 |
| 70 | - env: COMPILER=g++-4.4 |
| 71 | compiler: gcc |
| 72 | addons: &gcc44 |
| 73 | apt: |
| 74 | packages: ["g++-4.4", "valgrind", "g++-4.4-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 75 | sources: *apt_sources |
| 76 | |
| 77 | # GCC 4.5 |
| 78 | - env: COMPILER=g++-4.5 |
| 79 | compiler: gcc |
| 80 | addons: &gcc45 |
| 81 | apt: |
| 82 | packages: ["g++-4.5", "valgrind", "g++-4.5-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 83 | sources: *apt_sources |
| 84 | |
| 85 | # GCC 4.6 |
| 86 | - env: COMPILER=g++-4.6 |
| 87 | compiler: gcc |
| 88 | addons: &gcc46 |
| 89 | apt: |
| 90 | packages: [ "valgrind", "g++-4.6-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 91 | sources: *apt_sources |
| 92 | |
| 93 | # GCC 4.7 |
| 94 | - env: COMPILER=g++-4.7 |
| 95 | compiler: gcc |
| 96 | addons: &gcc47 |
| 97 | apt: |
| 98 | packages: ["g++-4.7", "valgrind", "g++-4.7-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 99 | sources: *apt_sources |
| 100 | |
| 101 | # GCC 4.8 |
| 102 | - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true |
| 103 | compiler: gcc |
| 104 | addons: &gcc48 |
| 105 | apt: |
| 106 | packages: ["g++-4.8", "valgrind", "g++-4.8-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 107 | sources: *apt_sources |
| 108 | |
| 109 | # GCC 4.9 |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 110 | - env: COMPILER=g++-4.9 HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true # no ASAN_32 - errors when using ASAN_OPTIONS - probably g++ 4.9 bug |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 111 | compiler: gcc |
| 112 | addons: &gcc49 |
| 113 | apt: |
| 114 | packages: ["g++-4.9", "valgrind", "g++-4.9-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 115 | sources: *apt_sources |
| 116 | |
| 117 | # GCC 5 |
| 118 | - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true ADDITIONAL_CXX_FLAGS=" -fuse-ld=gold" |
| 119 | compiler: gcc |
| 120 | addons: &gcc5 |
| 121 | apt: |
| 122 | packages: ["g++-5", "valgrind", "g++-5-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 123 | sources: *apt_sources |
| 124 | |
| 125 | # GCC 6 |
| 126 | - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true ADDITIONAL_CXX_FLAGS=" -fuse-ld=gold" |
| 127 | compiler: gcc |
| 128 | addons: &gcc6 |
| 129 | apt: |
| 130 | packages: ["g++-6", "valgrind", "g++-6-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 131 | sources: *apt_sources |
| 132 | |
| 133 | # Clang 3.4 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 134 | - env: COMPILER=clang++ HAS_ASAN_64=true HAS_UBSAN_64=true |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 135 | addons: &clang |
| 136 | apt: |
| 137 | packages: [ "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 138 | sources: *apt_sources |
| 139 | |
| 140 | # Clang 3.5 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 141 | - env: COMPILER=clang++-3.5 HAS_ASAN_64=true HAS_UBSAN_64=true |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 142 | addons: &clang35 |
| 143 | apt: |
| 144 | packages: ["clang-3.5", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 145 | sources: *apt_sources |
| 146 | |
| 147 | # Clang 3.6 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 148 | - env: COMPILER=clang++-3.6 HAS_ASAN_64=true HAS_UBSAN_64=true |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 149 | addons: &clang36 |
| 150 | apt: |
| 151 | packages: ["clang-3.6", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 152 | sources: *apt_sources |
| 153 | |
| 154 | # Clang 3.7 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 155 | - env: COMPILER=clang++-3.7 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 156 | addons: &clang37 |
| 157 | apt: |
| 158 | packages: ["clang-3.7", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 159 | sources: *apt_sources |
| 160 | |
| 161 | # Clang 3.8 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 162 | - env: COMPILER=clang++-3.8 HAS_ASAN_64=true HAS_UBSAN_64=true |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 163 | addons: &clang38 |
| 164 | apt: |
| 165 | packages: ["clang-3.8", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 166 | sources: *apt_sources |
| 167 | |
onqtam | 4402545 | 2016-11-15 01:25:24 +0200 | [diff] [blame] | 168 | # Clang 3.9 |
| 169 | - env: COMPILER=clang++-3.9 HAS_ASAN_64=true HAS_UBSAN_64=true |
| 170 | addons: &clang39 |
| 171 | apt: |
| 172 | packages: ["clang-3.9", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 173 | sources: *apt_sources |
| 174 | |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 175 | # Xcode 6.1 Clang |
| 176 | - env: COMPILER=clang++ |
| 177 | os: osx |
| 178 | |
| 179 | # Xcode 6.2 Clang |
| 180 | - env: COMPILER=clang++ |
| 181 | osx_image: beta-xcode6.2 |
| 182 | os: osx |
| 183 | |
| 184 | # Xcode 6.3 Clang |
| 185 | - env: COMPILER=clang++ |
| 186 | osx_image: beta-xcode6.3 |
| 187 | os: osx |
| 188 | |
| 189 | # Xcode 6.4 Clang |
| 190 | - env: COMPILER=clang++ |
| 191 | osx_image: xcode6.4 |
| 192 | os: osx |
| 193 | |
| 194 | # Xcode 7 Clang |
| 195 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 196 | osx_image: xcode7 |
| 197 | os: osx |
| 198 | |
| 199 | # Xcode 7.1 Clang |
| 200 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 201 | osx_image: xcode7.1 |
| 202 | os: osx |
| 203 | |
| 204 | # Xcode 7.2 Clang |
| 205 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 206 | osx_image: xcode7.2 |
| 207 | os: osx |
| 208 | |
| 209 | # Xcode 7.3 Clang |
| 210 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 211 | osx_image: xcode7.3 |
| 212 | os: osx |
| 213 | |
| 214 | # Xcode 8 Clang |
| 215 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 216 | osx_image: xcode8 |
| 217 | os: osx |
| 218 | |
onqtam | 3a6cb17 | 2016-11-16 16:35:30 +0200 | [diff] [blame^] | 219 | # Xcode 8.1 Clang |
| 220 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 221 | osx_image: xcode8.1 |
| 222 | os: osx |
| 223 | |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 224 | # OSX GCC 4.4 |
| 225 | - env: COMPILER=g++-4.4 |
| 226 | compiler: gcc |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 227 | osx_image: beta-xcode6.2 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 228 | os: osx |
| 229 | |
| 230 | # OSX GCC 4.5 |
| 231 | - env: COMPILER=g++-4.5 |
| 232 | compiler: gcc |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 233 | osx_image: beta-xcode6.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 234 | os: osx |
| 235 | |
| 236 | # OSX GCC 4.6 |
| 237 | - env: COMPILER=g++-4.6 |
| 238 | compiler: gcc |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 239 | osx_image: beta-xcode6.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 240 | os: osx |
| 241 | |
| 242 | # OSX GCC 4.7 |
| 243 | - env: COMPILER=g++-4.7 |
| 244 | compiler: gcc |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 245 | osx_image: beta-xcode6.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 246 | os: osx |
| 247 | |
| 248 | # OSX GCC 4.8 |
| 249 | - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true |
| 250 | compiler: gcc |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 251 | osx_image: beta-xcode6.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 252 | os: osx |
| 253 | |
| 254 | # OSX GCC 4.9 |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 255 | - env: COMPILER=g++-4.9 HAS_UBSAN_32=true HAS_UBSAN_64=true # no ASAN_32/ASAN_64 - errors when using ASAN_OPTIONS - probably g++ 4.9 bug |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 256 | compiler: gcc |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 257 | osx_image: beta-xcode6.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 258 | os: osx |
| 259 | |
| 260 | # OSX GCC 5 |
| 261 | - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true |
| 262 | compiler: gcc |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 263 | osx_image: beta-xcode6.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 264 | os: osx |
| 265 | |
| 266 | # OSX GCC 6 |
| 267 | - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true |
| 268 | compiler: gcc |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 269 | osx_image: beta-xcode6.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 270 | os: osx |
| 271 | |
| 272 | # OSX LLVM-GCC |
| 273 | - env: COMPILER=g++ |
| 274 | compiler: gcc |
| 275 | os: osx |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 276 | |
onqtam | 3ffb887 | 2016-06-07 23:46:09 +0300 | [diff] [blame] | 277 | allow_failures: |
onqtam | fd62aa0 | 2016-11-15 03:00:44 +0200 | [diff] [blame] | 278 | |
| 279 | # Clang 3.9 - failing because the llvm 3.9 ppa is not yet whitelisted... |
| 280 | - env: COMPILER=clang++-3.9 HAS_ASAN_64=true HAS_UBSAN_64=true |
| 281 | |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 282 | # for some reason some of these builds fail sometimes... |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 283 | |
| 284 | # OSX GCC 4.4 |
| 285 | - env: COMPILER=g++-4.4 |
onqtam | c6555cf | 2016-09-20 15:07:28 +0300 | [diff] [blame] | 286 | compiler: gcc |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 287 | osx_image: beta-xcode6.2 |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 288 | os: osx |
| 289 | |
| 290 | # OSX GCC 4.5 |
| 291 | - env: COMPILER=g++-4.5 |
| 292 | compiler: gcc |
| 293 | osx_image: beta-xcode6.3 |
| 294 | os: osx |
| 295 | |
| 296 | # OSX GCC 4.6 |
| 297 | - env: COMPILER=g++-4.6 |
| 298 | compiler: gcc |
| 299 | osx_image: beta-xcode6.3 |
| 300 | os: osx |
| 301 | |
| 302 | # OSX GCC 4.7 |
| 303 | - env: COMPILER=g++-4.7 |
| 304 | compiler: gcc |
| 305 | osx_image: beta-xcode6.3 |
| 306 | os: osx |
| 307 | |
| 308 | # OSX GCC 4.8 |
| 309 | - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true |
| 310 | compiler: gcc |
| 311 | osx_image: beta-xcode6.3 |
onqtam | c6555cf | 2016-09-20 15:07:28 +0300 | [diff] [blame] | 312 | os: osx |
onqtam | 3ffb887 | 2016-06-07 23:46:09 +0300 | [diff] [blame] | 313 | |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 314 | # OSX GCC 4.9 |
| 315 | - env: COMPILER=g++-4.9 HAS_UBSAN_32=true HAS_UBSAN_64=true # no ASAN_32/ASAN_64 - errors when using ASAN_OPTIONS - probably g++ 4.9 bug |
| 316 | compiler: gcc |
| 317 | osx_image: beta-xcode6.3 |
| 318 | os: osx |
| 319 | |
| 320 | # OSX GCC 5 |
| 321 | - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true |
| 322 | compiler: gcc |
| 323 | osx_image: beta-xcode6.3 |
| 324 | os: osx |
| 325 | |
| 326 | # OSX GCC 6 |
| 327 | - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true |
| 328 | compiler: gcc |
| 329 | osx_image: beta-xcode6.3 |
| 330 | os: osx |
| 331 | |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 332 | before_install: |
onqtam | 2c8036f | 2016-06-26 17:12:42 +0300 | [diff] [blame] | 333 | - git submodule update --init --recursive |
| 334 | |
| 335 | install: |
onqtam | 0115857 | 2016-06-28 14:29:32 +0300 | [diff] [blame] | 336 | ############################################################################ |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 337 | # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/ |
| 338 | ############################################################################ |
| 339 | |
| 340 | - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" |
| 341 | - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR} |
| 342 | |
| 343 | ############################################################################ |
| 344 | # Install a recent CMake |
| 345 | ############################################################################ |
| 346 | |
| 347 | - | |
| 348 | if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then |
| 349 | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" |
| 350 | mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake |
| 351 | export PATH=${DEPS_DIR}/cmake/bin:${PATH} |
| 352 | fi |
| 353 | |
| 354 | ############################################################################ |
| 355 | # Go back to ${TRAVIS_BUILD_DIR} |
| 356 | ############################################################################ |
| 357 | |
| 358 | - cd ${TRAVIS_BUILD_DIR} |
| 359 | |
| 360 | ############################################################################ |
onqtam | 0115857 | 2016-06-28 14:29:32 +0300 | [diff] [blame] | 361 | # Install stuff with homebrew under OSX |
| 362 | ############################################################################ |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 363 | |
onqtam | 23c6a34 | 2016-06-28 14:09:10 +0300 | [diff] [blame] | 364 | - | |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 365 | if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then |
| 366 | brew update |
| 367 | # brew install ccache |
| 368 | brew install valgrind |
| 369 | # cmake |
| 370 | if brew list -1 | grep -q "^cmake\$"; then |
| 371 | brew outdated cmake || brew upgrade cmake |
| 372 | else |
| 373 | brew install cmake |
| 374 | fi |
| 375 | # gcc |
| 376 | if [[ "${COMPILER}" = "g++-4.4" ]]; then |
| 377 | brew install gcc44 |
| 378 | fi |
| 379 | if [[ "${COMPILER}" = "g++-4.5" ]]; then |
| 380 | brew install gcc45 |
| 381 | fi |
| 382 | if [[ "${COMPILER}" = "g++-4.6" ]]; then |
| 383 | brew install gcc46 |
| 384 | fi |
| 385 | if [[ "${COMPILER}" = "g++-4.7" ]]; then |
| 386 | brew install gcc47 |
| 387 | fi |
| 388 | if [[ "${COMPILER}" = "g++-4.8" ]]; then |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 389 | brew install gcc48 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 390 | fi |
| 391 | if [[ "${COMPILER}" = "g++-4.9" ]]; then |
| 392 | brew install gcc49 |
| 393 | fi |
| 394 | if [[ "${COMPILER}" = "g++-5" ]]; then |
| 395 | brew install gcc5 |
| 396 | fi |
| 397 | if [[ "${COMPILER}" = "g++-6" ]]; then |
| 398 | brew install gcc6 |
| 399 | fi |
| 400 | fi |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 401 | - export CXX="${COMPILER}" |
onqtam | 9f934f8 | 2016-08-02 12:42:19 +0300 | [diff] [blame] | 402 | # - export CXX="ccache ${COMPILER}" |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 403 | # - ccache -s |
onqtam | 7dec6aa | 2016-06-26 16:01:15 +0300 | [diff] [blame] | 404 | |
| 405 | before_script: |
| 406 | - ${CXX} --version |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 407 | |
| 408 | script: |
| 409 | # coverage - do not continue with other build configurations after that |
| 410 | - | |
| 411 | if [[ "${COVERALLS_SERVICE_NAME}" = "travis-ci" ]]; then |
| 412 | cmake ${CMAKE_OPTIONS_GLOBAL} -DCMAKE_BUILD_TYPE=Debug . |
onqtam | 316fce2 | 2016-05-21 16:57:13 +0300 | [diff] [blame] | 413 | make -k -j2 && make coveralls |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 414 | exit |
| 415 | fi |
| 416 | |
| 417 | # initial run with options |
onqtam | cc35030 | 2016-06-28 14:36:28 +0300 | [diff] [blame] | 418 | - cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} . |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 419 | |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 420 | # debug x64 |
onqtam | fa5a852 | 2016-06-26 20:15:56 +0300 | [diff] [blame] | 421 | - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" . |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 422 | - make clean && make -k -j2 |
onqtam | 8e44b18 | 2016-05-22 05:28:31 +0300 | [diff] [blame] | 423 | # valgrind for 64bit under osx fails TOO |
| 424 | - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 425 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 426 | # release x64 |
onqtam | fa5a852 | 2016-06-26 20:15:56 +0300 | [diff] [blame] | 427 | - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" . |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 428 | - make clean && make -k -j2 |
onqtam | 8e44b18 | 2016-05-22 05:28:31 +0300 | [diff] [blame] | 429 | # valgrind for 64bit under osx fails TOO |
| 430 | - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 431 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 432 | # debug x86 |
onqtam | fa5a852 | 2016-06-26 20:15:56 +0300 | [diff] [blame] | 433 | - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" . |
onqtam | 316fce2 | 2016-05-21 16:57:13 +0300 | [diff] [blame] | 434 | - make clean && make -k -j2 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 435 | # valgrind for 32bit under osx fails |
| 436 | - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 437 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 438 | # release x86 |
onqtam | fa5a852 | 2016-06-26 20:15:56 +0300 | [diff] [blame] | 439 | - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" . |
onqtam | 316fce2 | 2016-05-21 16:57:13 +0300 | [diff] [blame] | 440 | - make clean && make -k -j2 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 441 | # valgrind for 32bit under osx fails |
| 442 | - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 443 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 444 | |
| 445 | # sanitizers - again 32/64 bit Debug/Release configs through address/undefined sanitizers |
onqtam | fba7fb7 | 2016-08-22 14:18:24 +0300 | [diff] [blame] | 446 | - cmake -DTEST_MODE=NORMAL . |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 447 | # on separate commands because when something fails I want to see which one exactly |
onqtam | 84b19bc | 2016-08-26 12:40:31 +0300 | [diff] [blame] | 448 | # TODO: when this http://stackoverflow.com/questions/39081183 gets resolved - add these to ASAN as well: check_initialization_order=true:strict_init_order=true |
| 449 | - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m64 -fsanitize=address" . && make clean && make -k -j2 && ASAN_OPTIONS=verbosity=2:strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true ctest --output-on-failure ; fi |
| 450 | - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m32 -fsanitize=address" . && make clean && make -k -j2 && ASAN_OPTIONS=verbosity=2:strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true ctest --output-on-failure ; fi |
| 451 | - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m64 -fsanitize=address" . && make clean && make -k -j2 && ASAN_OPTIONS=verbosity=2:strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true ctest --output-on-failure ; fi |
| 452 | - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m32 -fsanitize=address" . && make clean && make -k -j2 && ASAN_OPTIONS=verbosity=2:strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true ctest --output-on-failure ; fi |
| 453 | - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m64 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi |
| 454 | - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m32 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi |
| 455 | - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m64 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi |
| 456 | - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m32 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 457 | |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 458 | # test c++0x mode for warnings |
| 459 | - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" -DWITH_CPP11=1 . |
| 460 | - make clean && make -k -j2 |
| 461 | |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 462 | # - ccache -s |
| 463 | |
onqtam | 2dd5528 | 2016-06-13 18:05:38 +0300 | [diff] [blame] | 464 | #after_script: |
| 465 | # - cat compile_commands.json |