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 | 0d8997c | 2017-03-15 15:12:31 +0200 | [diff] [blame] | 53 | - llvm-toolchain-precise-4.0 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 54 | |
| 55 | compiler: clang |
| 56 | os: linux |
| 57 | |
| 58 | matrix: |
| 59 | exclude: |
| 60 | - env: TRAVIS_EMPTY_JOB_WORKAROUND=true |
| 61 | |
| 62 | include: |
onqtam | d1737e4 | 2016-08-01 19:05:07 +0300 | [diff] [blame] | 63 | # coverage |
| 64 | - env: COMPILER=g++ COVERALLS_SERVICE_NAME=travis-ci |
| 65 | compiler: gcc |
| 66 | addons: |
| 67 | apt: |
| 68 | packages: ["lcov", "curl"] |
| 69 | |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 70 | # GCC 4.4 |
| 71 | - env: COMPILER=g++-4.4 |
| 72 | compiler: gcc |
| 73 | addons: &gcc44 |
| 74 | apt: |
| 75 | packages: ["g++-4.4", "valgrind", "g++-4.4-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 76 | sources: *apt_sources |
| 77 | |
| 78 | # GCC 4.5 |
| 79 | - env: COMPILER=g++-4.5 |
| 80 | compiler: gcc |
| 81 | addons: &gcc45 |
| 82 | apt: |
| 83 | packages: ["g++-4.5", "valgrind", "g++-4.5-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 84 | sources: *apt_sources |
| 85 | |
| 86 | # GCC 4.6 |
| 87 | - env: COMPILER=g++-4.6 |
| 88 | compiler: gcc |
| 89 | addons: &gcc46 |
| 90 | apt: |
| 91 | packages: [ "valgrind", "g++-4.6-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 92 | sources: *apt_sources |
| 93 | |
| 94 | # GCC 4.7 |
| 95 | - env: COMPILER=g++-4.7 |
| 96 | compiler: gcc |
| 97 | addons: &gcc47 |
| 98 | apt: |
| 99 | packages: ["g++-4.7", "valgrind", "g++-4.7-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 100 | sources: *apt_sources |
| 101 | |
| 102 | # GCC 4.8 |
| 103 | - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true |
| 104 | compiler: gcc |
| 105 | addons: &gcc48 |
| 106 | apt: |
| 107 | packages: ["g++-4.8", "valgrind", "g++-4.8-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 108 | sources: *apt_sources |
| 109 | |
| 110 | # GCC 4.9 |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 111 | - 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] | 112 | compiler: gcc |
| 113 | addons: &gcc49 |
| 114 | apt: |
| 115 | packages: ["g++-4.9", "valgrind", "g++-4.9-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 116 | sources: *apt_sources |
| 117 | |
| 118 | # GCC 5 |
| 119 | - 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" |
| 120 | compiler: gcc |
| 121 | addons: &gcc5 |
| 122 | apt: |
| 123 | packages: ["g++-5", "valgrind", "g++-5-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 124 | sources: *apt_sources |
| 125 | |
| 126 | # GCC 6 |
| 127 | - 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" |
| 128 | compiler: gcc |
| 129 | addons: &gcc6 |
| 130 | apt: |
| 131 | packages: ["g++-6", "valgrind", "g++-6-multilib", "libc6-dbg", "libc6-dbg:i386"] |
| 132 | sources: *apt_sources |
| 133 | |
| 134 | # Clang 3.4 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 135 | - env: COMPILER=clang++ HAS_ASAN_64=true HAS_UBSAN_64=true |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 136 | addons: &clang |
| 137 | apt: |
| 138 | packages: [ "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 139 | sources: *apt_sources |
| 140 | |
| 141 | # Clang 3.5 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 142 | - env: COMPILER=clang++-3.5 HAS_ASAN_64=true HAS_UBSAN_64=true |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 143 | addons: &clang35 |
| 144 | apt: |
| 145 | packages: ["clang-3.5", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 146 | sources: *apt_sources |
| 147 | |
| 148 | # Clang 3.6 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 149 | - env: COMPILER=clang++-3.6 HAS_ASAN_64=true HAS_UBSAN_64=true |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 150 | addons: &clang36 |
| 151 | apt: |
| 152 | packages: ["clang-3.6", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 153 | sources: *apt_sources |
| 154 | |
| 155 | # Clang 3.7 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 156 | - env: COMPILER=clang++-3.7 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 157 | addons: &clang37 |
| 158 | apt: |
| 159 | packages: ["clang-3.7", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 160 | sources: *apt_sources |
| 161 | |
| 162 | # Clang 3.8 |
onqtam | c30ab66 | 2016-08-05 01:13:08 +0300 | [diff] [blame] | 163 | - env: COMPILER=clang++-3.8 HAS_ASAN_64=true HAS_UBSAN_64=true |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 164 | addons: &clang38 |
| 165 | apt: |
| 166 | packages: ["clang-3.8", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 167 | sources: *apt_sources |
| 168 | |
onqtam | 4402545 | 2016-11-15 01:25:24 +0200 | [diff] [blame] | 169 | # Clang 3.9 |
| 170 | - env: COMPILER=clang++-3.9 HAS_ASAN_64=true HAS_UBSAN_64=true |
| 171 | addons: &clang39 |
| 172 | apt: |
| 173 | packages: ["clang-3.9", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 174 | sources: *apt_sources |
| 175 | |
onqtam | 0d8997c | 2017-03-15 15:12:31 +0200 | [diff] [blame] | 176 | # Clang 4.0 |
| 177 | - env: COMPILER=clang++-4.0 HAS_ASAN_64=true HAS_UBSAN_64=true |
| 178 | addons: &clang40 |
| 179 | apt: |
| 180 | packages: ["clang-4.0", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 181 | sources: *apt_sources |
| 182 | |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 183 | # Xcode 6.4 Clang |
| 184 | - env: COMPILER=clang++ |
| 185 | osx_image: xcode6.4 |
| 186 | os: osx |
| 187 | |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 188 | # Xcode 7.3 Clang |
| 189 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 190 | osx_image: xcode7.3 |
| 191 | os: osx |
| 192 | |
| 193 | # Xcode 8 Clang |
| 194 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 195 | osx_image: xcode8 |
| 196 | os: osx |
| 197 | |
onqtam | 3a6cb17 | 2016-11-16 16:35:30 +0200 | [diff] [blame] | 198 | # Xcode 8.1 Clang |
| 199 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 200 | osx_image: xcode8.1 |
| 201 | os: osx |
| 202 | |
onqtam | 14de6f5 | 2016-11-18 11:08:23 +0200 | [diff] [blame] | 203 | # Xcode 8.2 Clang |
| 204 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 205 | osx_image: xcode8.2 |
| 206 | os: osx |
| 207 | |
onqtam | 01e8954 | 2017-03-28 17:48:59 +0300 | [diff] [blame] | 208 | # Xcode 8.3 Clang |
| 209 | - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true |
| 210 | osx_image: xcode8.3 |
| 211 | os: osx |
| 212 | |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 213 | # OSX GCC 4.6 |
| 214 | - env: COMPILER=g++-4.6 |
| 215 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 216 | osx_image: xcode8.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 217 | os: osx |
| 218 | |
| 219 | # OSX GCC 4.7 |
| 220 | - env: COMPILER=g++-4.7 |
| 221 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 222 | osx_image: xcode8.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 223 | os: osx |
| 224 | |
| 225 | # OSX GCC 4.8 |
| 226 | - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true |
| 227 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 228 | osx_image: xcode8.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 229 | os: osx |
| 230 | |
| 231 | # OSX GCC 4.9 |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 232 | - 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] | 233 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 234 | osx_image: xcode8.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 235 | os: osx |
| 236 | |
| 237 | # OSX GCC 5 |
| 238 | - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true |
| 239 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 240 | osx_image: xcode8.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 241 | os: osx |
| 242 | |
| 243 | # OSX GCC 6 |
| 244 | - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true |
| 245 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 246 | osx_image: xcode8.3 |
onqtam | 529c92c | 2016-08-02 17:51:59 +0300 | [diff] [blame] | 247 | os: osx |
| 248 | |
| 249 | # OSX LLVM-GCC |
| 250 | - env: COMPILER=g++ |
| 251 | compiler: gcc |
| 252 | os: osx |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 253 | |
onqtam | 3ffb887 | 2016-06-07 23:46:09 +0300 | [diff] [blame] | 254 | allow_failures: |
onqtam | fd62aa0 | 2016-11-15 03:00:44 +0200 | [diff] [blame] | 255 | |
onqtam | 8401535 | 2017-03-15 20:11:07 +0200 | [diff] [blame] | 256 | # https://travis-ci.org/onqtam/doctest/jobs/211341945 - Disallowing sources: llvm-toolchain-precise-4.0 |
| 257 | |
| 258 | # Clang 4.0 |
| 259 | - env: COMPILER=clang++-4.0 HAS_ASAN_64=true HAS_UBSAN_64=true |
| 260 | addons: &clang40 |
| 261 | apt: |
| 262 | packages: ["clang-4.0", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"] |
| 263 | sources: *apt_sources |
| 264 | |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 265 | # for some reason some of these builds fail sometimes... |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 266 | |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 267 | # OSX GCC 4.6 |
| 268 | - env: COMPILER=g++-4.6 |
| 269 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 270 | osx_image: xcode8.3 |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 271 | os: osx |
| 272 | |
| 273 | # OSX GCC 4.7 |
| 274 | - env: COMPILER=g++-4.7 |
| 275 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 276 | osx_image: xcode8.3 |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 277 | os: osx |
| 278 | |
| 279 | # OSX GCC 4.8 |
| 280 | - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true |
| 281 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 282 | osx_image: xcode8.3 |
onqtam | c6555cf | 2016-09-20 15:07:28 +0300 | [diff] [blame] | 283 | os: osx |
onqtam | 3ffb887 | 2016-06-07 23:46:09 +0300 | [diff] [blame] | 284 | |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 285 | # OSX GCC 4.9 |
| 286 | - 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 |
| 287 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 288 | osx_image: xcode8.3 |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 289 | os: osx |
| 290 | |
| 291 | # OSX GCC 5 |
| 292 | - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true |
| 293 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 294 | osx_image: xcode8.3 |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 295 | os: osx |
| 296 | |
| 297 | # OSX GCC 6 |
| 298 | - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true |
| 299 | compiler: gcc |
onqtam | 5d10992 | 2017-04-03 16:01:18 +0300 | [diff] [blame^] | 300 | osx_image: xcode8.3 |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 301 | os: osx |
| 302 | |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 303 | before_install: |
onqtam | 2c8036f | 2016-06-26 17:12:42 +0300 | [diff] [blame] | 304 | - git submodule update --init --recursive |
| 305 | |
| 306 | install: |
onqtam | 0115857 | 2016-06-28 14:29:32 +0300 | [diff] [blame] | 307 | ############################################################################ |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 308 | # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/ |
| 309 | ############################################################################ |
| 310 | |
| 311 | - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" |
| 312 | - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR} |
| 313 | |
| 314 | ############################################################################ |
| 315 | # Install a recent CMake |
| 316 | ############################################################################ |
| 317 | |
| 318 | - | |
| 319 | if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then |
onqtam | 8401535 | 2017-03-15 20:11:07 +0200 | [diff] [blame] | 320 | CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz" |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 321 | mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake |
| 322 | export PATH=${DEPS_DIR}/cmake/bin:${PATH} |
| 323 | fi |
| 324 | |
| 325 | ############################################################################ |
| 326 | # Go back to ${TRAVIS_BUILD_DIR} |
| 327 | ############################################################################ |
| 328 | |
| 329 | - cd ${TRAVIS_BUILD_DIR} |
| 330 | |
| 331 | ############################################################################ |
onqtam | 0115857 | 2016-06-28 14:29:32 +0300 | [diff] [blame] | 332 | # Install stuff with homebrew under OSX |
| 333 | ############################################################################ |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 334 | |
onqtam | 23c6a34 | 2016-06-28 14:09:10 +0300 | [diff] [blame] | 335 | - | |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 336 | if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then |
| 337 | brew update |
| 338 | # brew install ccache |
| 339 | brew install valgrind |
| 340 | # cmake |
| 341 | if brew list -1 | grep -q "^cmake\$"; then |
| 342 | brew outdated cmake || brew upgrade cmake |
| 343 | else |
| 344 | brew install cmake |
| 345 | fi |
| 346 | # gcc |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 347 | if [[ "${COMPILER}" = "g++-4.6" ]]; then |
| 348 | brew install gcc46 |
| 349 | fi |
| 350 | if [[ "${COMPILER}" = "g++-4.7" ]]; then |
| 351 | brew install gcc47 |
| 352 | fi |
| 353 | if [[ "${COMPILER}" = "g++-4.8" ]]; then |
onqtam | b1a3de8 | 2016-10-10 22:22:00 +0300 | [diff] [blame] | 354 | brew install gcc48 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 355 | fi |
| 356 | if [[ "${COMPILER}" = "g++-4.9" ]]; then |
| 357 | brew install gcc49 |
| 358 | fi |
| 359 | if [[ "${COMPILER}" = "g++-5" ]]; then |
| 360 | brew install gcc5 |
| 361 | fi |
| 362 | if [[ "${COMPILER}" = "g++-6" ]]; then |
| 363 | brew install gcc6 |
| 364 | fi |
| 365 | fi |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 366 | - export CXX="${COMPILER}" |
onqtam | 9f934f8 | 2016-08-02 12:42:19 +0300 | [diff] [blame] | 367 | # - export CXX="ccache ${COMPILER}" |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 368 | # - ccache -s |
onqtam | 7dec6aa | 2016-06-26 16:01:15 +0300 | [diff] [blame] | 369 | |
| 370 | before_script: |
| 371 | - ${CXX} --version |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 372 | |
| 373 | script: |
| 374 | # coverage - do not continue with other build configurations after that |
| 375 | - | |
| 376 | if [[ "${COVERALLS_SERVICE_NAME}" = "travis-ci" ]]; then |
| 377 | cmake ${CMAKE_OPTIONS_GLOBAL} -DCMAKE_BUILD_TYPE=Debug . |
onqtam | 316fce2 | 2016-05-21 16:57:13 +0300 | [diff] [blame] | 378 | make -k -j2 && make coveralls |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 379 | exit |
| 380 | fi |
| 381 | |
| 382 | # initial run with options |
onqtam | cc35030 | 2016-06-28 14:36:28 +0300 | [diff] [blame] | 383 | - cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} . |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 384 | |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 385 | # debug x64 |
onqtam | fa5a852 | 2016-06-26 20:15:56 +0300 | [diff] [blame] | 386 | - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" . |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 387 | - make clean && make -k -j2 |
onqtam | 8e44b18 | 2016-05-22 05:28:31 +0300 | [diff] [blame] | 388 | - 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] | 389 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 390 | # release x64 |
onqtam | fa5a852 | 2016-06-26 20:15:56 +0300 | [diff] [blame] | 391 | - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" . |
onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 392 | - make clean && make -k -j2 |
onqtam | 8e44b18 | 2016-05-22 05:28:31 +0300 | [diff] [blame] | 393 | - 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] | 394 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 395 | # debug x86 |
onqtam | fa5a852 | 2016-06-26 20:15:56 +0300 | [diff] [blame] | 396 | - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" . |
onqtam | 316fce2 | 2016-05-21 16:57:13 +0300 | [diff] [blame] | 397 | - make clean && make -k -j2 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 398 | - 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] | 399 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 400 | # release x86 |
onqtam | fa5a852 | 2016-06-26 20:15:56 +0300 | [diff] [blame] | 401 | - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" . |
onqtam | 316fce2 | 2016-05-21 16:57:13 +0300 | [diff] [blame] | 402 | - make clean && make -k -j2 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 403 | - 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] | 404 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 405 | |
| 406 | # sanitizers - again 32/64 bit Debug/Release configs through address/undefined sanitizers |
onqtam | fba7fb7 | 2016-08-22 14:18:24 +0300 | [diff] [blame] | 407 | - cmake -DTEST_MODE=NORMAL . |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 408 | # 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] | 409 | # TODO: when this http://stackoverflow.com/questions/39081183 gets resolved - add these to ASAN as well: check_initialization_order=true:strict_init_order=true |
| 410 | - 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 |
| 411 | - 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 |
| 412 | - 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 |
| 413 | - 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 |
| 414 | - 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 |
| 415 | - 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 |
| 416 | - 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 |
| 417 | - 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] | 418 | |
onqtam | 7a3ad26 | 2017-03-18 18:05:10 +0200 | [diff] [blame] | 419 | # test in c++0x mode - just Debug/x64 |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 420 | - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" -DWITH_CPP11=1 . |
| 421 | - make clean && make -k -j2 |
onqtam | 7a3ad26 | 2017-03-18 18:05:10 +0200 | [diff] [blame] | 422 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 423 | |
onqtam | 7a3ad26 | 2017-03-18 18:05:10 +0200 | [diff] [blame] | 424 | # test without rtti - just Debug/x64 |
onqtam | f63c510 | 2017-02-25 20:00:52 +0200 | [diff] [blame] | 425 | - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64 -fno-rtti" -DWITH_CPP11=0 . |
| 426 | - make clean && make -k -j2 |
onqtam | 7a3ad26 | 2017-03-18 18:05:10 +0200 | [diff] [blame] | 427 | - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure |
onqtam | f63c510 | 2017-02-25 20:00:52 +0200 | [diff] [blame] | 428 | |
onqtam | 7a3ad26 | 2017-03-18 18:05:10 +0200 | [diff] [blame] | 429 | # test only compilation without exceptions - just Debug/x64 |
onqtam | 2d93e04 | 2017-03-17 18:57:59 +0200 | [diff] [blame] | 430 | - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64 -fno-exceptions -DDOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS" -DWITH_CPP11=0 . |
| 431 | - make clean && make -k -j2 |
| 432 | |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 433 | # - ccache -s |
| 434 | |
onqtam | 2dd5528 | 2016-06-13 18:05:38 +0300 | [diff] [blame] | 435 | #after_script: |
| 436 | # - cat compile_commands.json |