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