Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 1 | # # this file is HEAVILY influenced by https://github.com/boostorg/hana/blob/master/.travis.yml |
onqtam | e85b1bb | 2016-06-26 16:41:09 +0300 | [diff] [blame] | 2 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 3 | # dist: trusty |
| 4 | # language: c++ |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 5 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 6 | # notifications: |
| 7 | # email: false |
| 8 | # # gitter |
| 9 | # webhooks: |
| 10 | # urls: https://webhooks.gitter.im/e/10941dd1c67e5e967706 |
| 11 | # on_success: change |
| 12 | # on_failure: always |
| 13 | # git: |
| 14 | # depth: 500 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 15 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 16 | # # both apt and ccache make the builds slower... |
| 17 | # #cache: |
| 18 | # # - apt |
| 19 | # # - ccache |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 20 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 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" |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 29 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 30 | # addons: |
| 31 | # coverity_scan: |
| 32 | # # COVERITY_SCAN_TOKEN added as env var in travis project |
| 33 | # project: |
onqtam | 8ee3545 | 2021-12-15 15:42:40 +0200 | [diff] [blame] | 34 | # name: doctest/doctest |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 35 | # notification_email: vik.kirilov@gmail.com |
| 36 | # build_command: clang++ scripts/hello_world.cpp -I doctest |
| 37 | # branch_pattern: coverity_scan |
| 38 | # # these apt sources will be referenced later (by using *name) |
| 39 | # apt: |
| 40 | # sources: &apt_sources |
| 41 | # - ubuntu-toolchain-r-test |
| 42 | # - llvm-toolchain-trusty |
| 43 | # - llvm-toolchain-precise-3.7 |
| 44 | # - llvm-toolchain-trusty-3.9 |
| 45 | # - llvm-toolchain-trusty-4.0 |
| 46 | # - llvm-toolchain-trusty-5.0 |
| 47 | # - llvm-toolchain-trusty-6.0 |
| 48 | # - llvm-toolchain-trusty-7 |
| 49 | # - llvm-toolchain-trusty-8 |
| 50 | # - llvm-toolchain-trusty-9 |
| 51 | # - llvm-toolchain-trusty-10 |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 52 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 53 | # compiler: clang |
| 54 | # os: linux |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 55 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 56 | # matrix: |
| 57 | # include: |
| 58 | # # coverage |
| 59 | # - env: COMPILER=g++ CODE_COVERAGE=true |
| 60 | # compiler: gcc |
| 61 | # addons: |
| 62 | # apt: |
| 63 | # packages: ["lcov"] |
onqtam | d1737e4 | 2016-08-01 19:05:07 +0300 | [diff] [blame] | 64 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 65 | # # static code analysis |
| 66 | # - env: COMPILER=clang++-4.0 STATIC_CODE_ANALYSIS=true |
| 67 | # addons: &static_analysis |
| 68 | # apt: |
| 69 | # packages: ["clang-4.0", "clang-tidy-4.0", "cppcheck"] |
| 70 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 71 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 72 | # # GCC 4.8 |
| 73 | # - env: COMPILER=g++-4.8 HAS_ASAN=true SANITIZER_CXX_FLAGS="-fuse-ld=gold -static-libasan" TSAN_CXX_FLAGS="-ltsan" # TSAN broken for some time - seg faults |
| 74 | # compiler: gcc |
| 75 | # addons: &gcc48 |
| 76 | # apt: |
| 77 | # packages: ["g++-4.8", "valgrind", "libc6-dbg", "linux-libc-dev"] |
| 78 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 79 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 80 | # # GCC 4.9 |
| 81 | # - env: COMPILER=g++-4.9 HAS_ASAN=true HAS_UBSAN=true SANITIZER_CXX_FLAGS="-fuse-ld=gold -static-libasan" TSAN_CXX_FLAGS="-ltsan" # TSAN broken for some time - seg faults |
| 82 | # compiler: gcc |
| 83 | # addons: &gcc49 |
| 84 | # apt: |
| 85 | # packages: ["g++-4.9", "valgrind", "libc6-dbg", "linux-libc-dev"] |
| 86 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 87 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 88 | # # GCC 5 |
| 89 | # - env: COMPILER=g++-5 HAS_ASAN=true HAS_UBSAN=true SANITIZER_CXX_FLAGS="-fuse-ld=gold -static-libasan" TSAN_CXX_FLAGS="-ltsan" # TSAN broken for some time - seg faults |
| 90 | # compiler: gcc |
| 91 | # addons: &gcc5 |
| 92 | # apt: |
| 93 | # packages: ["g++-5", "valgrind", "libc6-dbg", "linux-libc-dev"] |
| 94 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 95 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 96 | # # GCC 6 |
| 97 | # - env: COMPILER=g++-6 HAS_ASAN=true HAS_UBSAN=true SANITIZER_CXX_FLAGS="-fuse-ld=gold -static-libasan" TSAN_CXX_FLAGS="-ltsan" # TSAN broken for some time - seg faults |
| 98 | # compiler: gcc |
| 99 | # addons: &gcc6 |
| 100 | # apt: |
| 101 | # packages: ["g++-6", "valgrind", "libc6-dbg", "linux-libc-dev"] |
| 102 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 103 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 104 | # # GCC 7 |
| 105 | # - env: COMPILER=g++-7 HAS_ASAN=true HAS_UBSAN=true SANITIZER_CXX_FLAGS="-fuse-ld=gold -static-libasan" TSAN_CXX_FLAGS="-ltsan" # TSAN broken for some time - seg faults |
| 106 | # compiler: gcc |
| 107 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 108 | # addons: &gcc7 |
| 109 | # apt: |
| 110 | # packages: ["g++-7", "valgrind", "libc6-dbg", "linux-libc-dev"] |
| 111 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 112 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 113 | # # GCC 8 |
| 114 | # - env: COMPILER=g++-8 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true SANITIZER_CXX_FLAGS="-fuse-ld=gold -static-libasan" TSAN_CXX_FLAGS="-ltsan" |
| 115 | # compiler: gcc |
| 116 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 117 | # addons: &gcc8 |
| 118 | # apt: |
| 119 | # packages: ["g++-8", "valgrind", "libc6-dbg", "linux-libc-dev"] |
| 120 | # sources: *apt_sources |
onqtam | e5f8b67 | 2018-05-03 16:02:32 +0300 | [diff] [blame] | 121 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 122 | # # GCC 9 |
| 123 | # - env: COMPILER=g++-9 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true SANITIZER_CXX_FLAGS="-fuse-ld=gold -static-libasan" TSAN_CXX_FLAGS="-ltsan" |
| 124 | # compiler: gcc |
| 125 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 126 | # addons: &gcc9 |
| 127 | # apt: |
| 128 | # packages: ["g++-9", "valgrind", "libc6-dbg", "linux-libc-dev"] |
| 129 | # sources: *apt_sources |
onqtam | 0df6ead | 2019-05-06 11:18:28 +0300 | [diff] [blame] | 130 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 131 | # # GCC 10 |
| 132 | # - env: COMPILER=g++-10 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true SANITIZER_CXX_FLAGS="-fuse-ld=gold -static-libasan" TSAN_CXX_FLAGS="-ltsan" |
| 133 | # compiler: gcc |
| 134 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 135 | # addons: &gcc10 |
| 136 | # apt: |
| 137 | # packages: ["g++-10", "valgrind", "libc6-dbg", "linux-libc-dev"] |
| 138 | # sources: *apt_sources |
onqtam | ea792bc | 2020-05-17 18:21:55 +0300 | [diff] [blame] | 139 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 140 | # # Clang 3.5 |
onqtam | 8ee3545 | 2021-12-15 15:42:40 +0200 | [diff] [blame] | 141 | # - env: COMPILER=clang++-3.5 HAS_ASAN=true HAS_UBSAN=true # no HAS_TSAN - see errors: https://travis-ci.org/doctest/doctest/builds/417926743 |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 142 | # addons: &clang35 |
| 143 | # apt: |
| 144 | # packages: ["clang-3.5", "valgrind", "libc6-dbg", "g++-6"] |
| 145 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 146 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 147 | # # Clang 3.6 |
onqtam | 8ee3545 | 2021-12-15 15:42:40 +0200 | [diff] [blame] | 148 | # - env: COMPILER=clang++-3.6 HAS_ASAN=true HAS_UBSAN=true # no HAS_TSAN - see errors: https://travis-ci.org/doctest/doctest/builds/417926743 |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 149 | # addons: &clang36 |
| 150 | # apt: |
| 151 | # packages: ["clang-3.6", "valgrind", "libc6-dbg", "g++-6"] |
| 152 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 153 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 154 | # # Clang 3.7 |
| 155 | # - env: COMPILER=clang++-3.7 |
| 156 | # addons: &clang37 |
| 157 | # apt: |
| 158 | # packages: ["clang-3.7", "valgrind", "libc6-dbg", "g++-6"] |
| 159 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 160 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 161 | # # Clang 3.8 |
onqtam | 8ee3545 | 2021-12-15 15:42:40 +0200 | [diff] [blame] | 162 | # - env: COMPILER=clang++-3.8 HAS_ASAN=true HAS_UBSAN=true # no HAS_TSAN - see errors: https://travis-ci.org/doctest/doctest/builds/417926743 |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 163 | # addons: &clang38 |
| 164 | # apt: |
| 165 | # packages: ["clang-3.8", "valgrind", "libc6-dbg", "g++-6"] |
| 166 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 167 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 168 | # # Clang 3.9 |
onqtam | 8ee3545 | 2021-12-15 15:42:40 +0200 | [diff] [blame] | 169 | # - env: COMPILER=clang++-3.9 # no HAS_ASAN/HAS_UBSAN - see errors: https://travis-ci.org/doctest/doctest/jobs/386263910 |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 170 | # addons: &clang39 |
| 171 | # apt: |
| 172 | # packages: ["clang-3.9", "valgrind", "libc6-dbg", "g++-6"] |
| 173 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 174 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 175 | # # Clang 4.0 |
| 176 | # - env: COMPILER=clang++-4.0 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 177 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 178 | # addons: &clang40 |
| 179 | # apt: |
| 180 | # packages: ["clang-4.0", "valgrind", "libc6-dbg", "g++-6"] |
| 181 | # sources: *apt_sources |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 182 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 183 | # # Clang 5.0 |
| 184 | # - env: COMPILER=clang++-5.0 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 185 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 186 | # addons: &clang50 |
| 187 | # apt: |
| 188 | # packages: ["clang-5.0", "valgrind", "libc6-dbg", "g++-6"] |
| 189 | # sources: *apt_sources |
onqtam | 803bb8f | 2017-09-05 13:00:24 +0300 | [diff] [blame] | 190 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 191 | # # Clang 6.0 |
| 192 | # - env: COMPILER=clang++-6.0 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 193 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 194 | # addons: &clang60 |
| 195 | # apt: |
| 196 | # packages: ["clang-6.0", "valgrind", "libc6-dbg", "g++-6"] |
| 197 | # sources: *apt_sources |
onqtam | 0875406 | 2019-03-20 18:53:33 +0200 | [diff] [blame] | 198 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 199 | # # Clang 7 |
| 200 | # - env: COMPILER=clang++-7 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 201 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 202 | # addons: &clang7 |
| 203 | # apt: |
| 204 | # packages: ["clang-7", "valgrind", "libc6-dbg", "g++-6"] |
| 205 | # sources: *apt_sources |
onqtam | cb279b2 | 2018-03-09 01:31:09 +0700 | [diff] [blame] | 206 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 207 | # # Clang 8 |
| 208 | # - env: COMPILER=clang++-8 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 209 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 210 | # addons: &clang8 |
| 211 | # apt: |
| 212 | # packages: ["clang-8", "valgrind", "libc6-dbg", "g++-6"] |
| 213 | # sources: *apt_sources |
onqtam | 0875406 | 2019-03-20 18:53:33 +0200 | [diff] [blame] | 214 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 215 | # # Clang 9 |
| 216 | # - env: COMPILER=clang++-9 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 217 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 218 | # addons: &clang9 |
| 219 | # apt: |
| 220 | # packages: ["clang-9", "valgrind", "libc6-dbg", "g++-6"] |
| 221 | # sources: *apt_sources |
onqtam | 399b01a | 2020-02-24 19:12:30 +0200 | [diff] [blame] | 222 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 223 | # # Clang 10 |
| 224 | # - env: COMPILER=clang++-10 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 225 | # sudo: required # see this issue for more details: https://github.com/travis-ci/travis-ci/issues/9033 |
| 226 | # addons: &clang9 |
| 227 | # apt: |
| 228 | # packages: ["clang-10", "valgrind", "libc6-dbg", "g++-6"] |
| 229 | # sources: *apt_sources |
onqtam | 50cbb80 | 2017-12-09 17:17:39 +0200 | [diff] [blame] | 230 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 231 | # # Xcode 9.4 Clang |
onqtam | 8ee3545 | 2021-12-15 15:42:40 +0200 | [diff] [blame] | 232 | # - env: COMPILER=clang++ HAS_UBSAN=true HAS_TSAN=true # no HAS_ASAN - errors since using thread_local even in single-threaded cases - see errors: https://travis-ci.org/doctest/doctest/builds/417181981 |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 233 | # osx_image: xcode9.4 |
| 234 | # os: osx |
onqtam | 3a3bc20 | 2018-04-10 13:54:28 +0300 | [diff] [blame] | 235 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 236 | # # Xcode 10.0 Clang |
| 237 | # - env: COMPILER=clang++ HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 238 | # osx_image: xcode10 |
| 239 | # os: osx |
onqtam | 09fd51d | 2018-08-16 19:55:21 +0300 | [diff] [blame] | 240 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 241 | # # Xcode 10.2 Clang |
| 242 | # - env: COMPILER=clang++ HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 243 | # osx_image: xcode10.2 |
| 244 | # os: osx |
onqtam | 5a18b49 | 2019-03-02 16:04:25 +0200 | [diff] [blame] | 245 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 246 | # # Xcode 11.2 Clang |
| 247 | # - env: COMPILER=clang++ HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 248 | # osx_image: xcode11.2 |
| 249 | # os: osx |
onqtam | accd1e4 | 2019-10-10 22:02:11 +0300 | [diff] [blame] | 250 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 251 | # # OSX LLVM-GCC |
| 252 | # - env: COMPILER=g++ HAS_ASAN=true HAS_TSAN=true |
| 253 | # compiler: gcc |
| 254 | # osx_image: xcode10 |
| 255 | # os: osx |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 256 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 257 | # allow_failures: |
onqtam | aec53d2 | 2017-05-03 06:29:47 +0300 | [diff] [blame] | 258 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 259 | # # static code analysis |
| 260 | # - env: COMPILER=clang++-4.0 STATIC_CODE_ANALYSIS=true |
onqtam | d6e8661 | 2018-05-31 14:32:16 +0300 | [diff] [blame] | 261 | |
onqtam | 8ee3545 | 2021-12-15 15:42:40 +0200 | [diff] [blame] | 262 | # # seems to not be present yet: https://travis-ci.org/github/doctest/doctest/jobs/688097537 |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 263 | # # GCC 10 |
| 264 | # - env: COMPILER=g++-10 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true SANITIZER_CXX_FLAGS="-fuse-ld=gold -static-libasan" TSAN_CXX_FLAGS="-ltsan" |
| 265 | # compiler: gcc |
| 266 | # sudo: required |
onqtam | f70d7e1 | 2020-05-17 20:28:45 +0300 | [diff] [blame] | 267 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 268 | # # Clang 10 |
| 269 | # - env: COMPILER=clang++-10 HAS_ASAN=true HAS_UBSAN=true HAS_TSAN=true |
| 270 | # sudo: required |
Viktor Kirilov | b1790b8 | 2020-09-06 19:49:29 +0300 | [diff] [blame] | 271 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 272 | # install: |
| 273 | # - if [[ "${CODE_COVERAGE}" == "true" ]]; then gem install coveralls-lcov ; fi |
onqtam | f6d1a51 | 2017-05-01 13:56:12 +0300 | [diff] [blame] | 274 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 275 | # ############################################################################ |
| 276 | # # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/ |
| 277 | # ############################################################################ |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 278 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 279 | # # Make a dir for all |
| 280 | # - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" |
| 281 | # - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR} |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 282 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 283 | # # Install a recent CMake |
| 284 | # - | |
| 285 | # if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then |
| 286 | # CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz" |
| 287 | # mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake |
| 288 | # export PATH=${DEPS_DIR}/cmake/bin:${PATH} |
| 289 | # fi |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 290 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 291 | # # Install OCLint |
| 292 | # - | |
| 293 | # if [[ "${STATIC_CODE_ANALYSIS}" = "true" ]]; then |
| 294 | # OCLINT_URL="https://github.com/oclint/oclint/releases/download/v0.12/oclint-0.12-x86_64-linux-3.13.0-112-generic.tar.gz" |
| 295 | # mkdir oclint && travis_retry wget --no-check-certificate --quiet -O - ${OCLINT_URL} | tar --strip-components=1 -xz -C oclint |
| 296 | # export PATH=${DEPS_DIR}/oclint/bin:${PATH} |
| 297 | # fi |
onqtam | ebc7da3 | 2017-05-13 21:33:19 +0300 | [diff] [blame] | 298 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 299 | # # Go back to ${TRAVIS_BUILD_DIR} |
| 300 | # - cd ${TRAVIS_BUILD_DIR} |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 301 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 302 | # ############################################################################ |
| 303 | # # Install stuff with homebrew under OSX |
| 304 | # ############################################################################ |
onqtam | c7aaa96 | 2016-09-10 02:16:57 +0300 | [diff] [blame] | 305 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 306 | # - | |
| 307 | # if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then |
| 308 | # brew update |
| 309 | # # brew install ccache |
| 310 | # # brew install valgrind |
| 311 | # # cmake |
| 312 | # if brew list -1 | grep -q "^cmake\$"; then |
| 313 | # brew outdated cmake || brew upgrade cmake |
| 314 | # else |
| 315 | # brew install cmake |
| 316 | # fi |
| 317 | # fi |
onqtam | f6d1a51 | 2017-05-01 13:56:12 +0300 | [diff] [blame] | 318 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 319 | # - export CXX="${COMPILER}" |
| 320 | # # - export CXX="ccache ${COMPILER}" |
| 321 | # # - ccache -s |
onqtam | 7dec6aa | 2016-06-26 16:01:15 +0300 | [diff] [blame] | 322 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 323 | # before_script: |
| 324 | # - ${CXX} --version |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 325 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 326 | # script: |
| 327 | # # coverage |
| 328 | # - | |
| 329 | # if [[ "${CODE_COVERAGE}" = "true" ]]; then |
| 330 | # cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage -std=c++0x" -DCMAKE_BUILD_TYPE=Debug . || exit 1 |
| 331 | # make -k -j2 || exit 1 |
| 332 | # ctest -j2 --output-on-failure || exit 1 |
onqtam | 81eab5e | 2017-05-08 11:51:20 +0300 | [diff] [blame] | 333 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 334 | # lcov -d . -c -o coverage.info # parse coverage data |
| 335 | # lcov -r coverage.info "/usr*" -o coverage.info # remove data for system headers |
| 336 | # lcov -r coverage.info "$(readlink -f examples)/*" -o coverage.info # remove data for .cpp files |
| 337 | # lcov -r coverage.info "$(readlink -f scripts)/*" -o coverage.info # remove data for .cpp files |
| 338 | # lcov -l coverage.info # just list a short summary of the results |
| 339 | # coveralls-lcov --repo-token=${COVERALLS_REPO_TOKEN} coverage.info # upload results |
onqtam | 5a2b255 | 2017-05-01 14:03:04 +0300 | [diff] [blame] | 340 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 341 | # # do not continue with other build configurations after that |
| 342 | # exit |
| 343 | # fi |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 344 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 345 | # # static code analysis |
| 346 | # - | |
| 347 | # if [[ "${STATIC_CODE_ANALYSIS}" = "true" ]]; then |
| 348 | # # setup a test file "doctest.cpp" that is the header + a test case at the end |
| 349 | # echo "#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN\n" >> doctest.cpp |
| 350 | # cat doctest/doctest.h >> doctest.cpp |
| 351 | # echo -e "TEST_CASE(\"\") {\n\tint a = 6;\n\tSUBCASE(\"\") a = 5;\n\tCAPTURE(a);\n\tCHECK(a == 6);\n}\n" >> doctest.cpp |
onqtam | c2b6e13 | 2017-05-08 16:37:31 +0300 | [diff] [blame] | 352 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 353 | # # cppcheck |
| 354 | # cppcheck doctest.cpp --enable=all --suppress=unmatchedSuppression --suppress=missingIncludeSystem --suppress=unusedFunction --suppress=functionConst --inline-suppr --platform=unix64 --inconclusive --std=posix --inconclusive -v --error-exitcode=1 --template "{file}({line}): {severity} ({id}): {message}" |
onqtam | ebc7da3 | 2017-05-13 21:33:19 +0300 | [diff] [blame] | 355 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 356 | # # oclint |
| 357 | # oclint doctest.cpp -disable-rule=ShortVariableName -disable-rule=LongLine -disable-rule=LongMethod -disable-rule=HighNcssMethod -disable-rule=LongVariableName -disable-rule=HighCyclomaticComplexity -disable-rule=HighNPathComplexity -disable-rule=UnusedLocalVariable -disable-rule=DoubleNegative -disable-rule=MultipleUnaryOperator -disable-rule=DeepNestedBlock || exit 1 |
onqtam | 81eab5e | 2017-05-08 11:51:20 +0300 | [diff] [blame] | 358 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 359 | # # clang-tidy |
| 360 | # cd scripts/playground |
| 361 | # cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} . || exit 1 |
| 362 | # clang-tidy-4.0 -std=c++11 -p=. *.cpp -header-filter=.* -warnings-as-errors=* -checks='*,-misc-misplaced-widening-cast,-misc-macro-parentheses,-misc-definitions-in-headers,-misc-unused-parameters,-llvm-header-guard,-llvm-include-order,-google-readability-braces-around-statements,-google-runtime-references,-google-readability-todo,-google-build-using-namespace,-google-explicit-constructor,-cert-err58-cpp,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-special-member-functions,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-type-member-init,-cppcoreguidelines-pro-type-union-access,-clang-analyzer-security.insecureAPI.strcpy,-modernize-loop-convert,-modernize-use-auto,-modernize-use-bool-literals,-readability-braces-around-statements,-readability-named-parameter,-readability-else-after-return,-readability-redundant-declaration,-readability-implicit-bool-cast,-clang-diagnostic-variadic-macros,-clang-diagnostic-c++11-compat' || exit 1 |
onqtam | 81eab5e | 2017-05-08 11:51:20 +0300 | [diff] [blame] | 363 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 364 | # # do not continue with other build configurations after that |
| 365 | # exit |
| 366 | # fi |
onqtam | 21623a6 | 2017-04-27 21:47:46 +0300 | [diff] [blame] | 367 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 368 | # # initial run with options |
| 369 | # - cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} . |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 370 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 371 | # # set the common CXX flags |
| 372 | # - export CXX_FLAGS="${CXX_FLAGS} -std=c++0x" |
onqtam | dd40fa9 | 2018-08-19 16:29:10 +0300 | [diff] [blame] | 373 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 374 | # # debug |
| 375 | # - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" . |
| 376 | # - make clean && make -k -j2 |
| 377 | # - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DDOCTEST_TEST_MODE=VALGRIND . && ctest -j2 --output-on-failure ; fi |
| 378 | # - cmake -DDOCTEST_TEST_MODE=COMPARE . && ctest -j2 --output-on-failure |
| 379 | # # release |
| 380 | # - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" . |
| 381 | # - make clean && make -k -j2 |
| 382 | # - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DDOCTEST_TEST_MODE=VALGRIND . && ctest -j2 --output-on-failure ; fi |
| 383 | # - cmake -DDOCTEST_TEST_MODE=COMPARE . && ctest -j2 --output-on-failure |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 384 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 385 | # # sanitizers - again Debug/Release configs through address/undefined/thread sanitizers |
| 386 | # # on separate commands because when something fails I want to see which one exactly |
| 387 | # - cmake -DDOCTEST_TEST_MODE=NORMAL . |
onqtam | 558afbb | 2018-08-19 16:50:05 +0300 | [diff] [blame] | 388 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 389 | # - export ASAN_OPTIONS=verbosity=2:strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true:check_initialization_order=true:strict_init_order=true |
| 390 | # - if [[ "${HAS_ASAN}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${SANITIZER_CXX_FLAGS} -g -fno-omit-frame-pointer -fsanitize=address" . && make clean && make -k -j2 && ctest -j2 --output-on-failure ; fi |
| 391 | # - if [[ "${HAS_ASAN}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${SANITIZER_CXX_FLAGS} -g -fno-omit-frame-pointer -fsanitize=address" . && make clean && make -k -j2 && ctest -j2 --output-on-failure ; fi |
onqtam | 558afbb | 2018-08-19 16:50:05 +0300 | [diff] [blame] | 392 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 393 | # - export UBSAN_OPTIONS=verbosity=2 |
| 394 | # - if [[ "${HAS_UBSAN}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${SANITIZER_CXX_FLAGS} -g -fno-omit-frame-pointer -fsanitize=undefined" . && make clean && make -k -j2 && ctest -j2 --output-on-failure ; fi |
| 395 | # - if [[ "${HAS_UBSAN}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${SANITIZER_CXX_FLAGS} -g -fno-omit-frame-pointer -fsanitize=undefined" . && make clean && make -k -j2 && ctest -j2 --output-on-failure ; fi |
onqtam | 558afbb | 2018-08-19 16:50:05 +0300 | [diff] [blame] | 396 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 397 | # - export TSAN_OPTIONS=verbosity=2:force_seq_cst_atomics=1 |
| 398 | # - if [[ "${HAS_TSAN}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${SANITIZER_CXX_FLAGS} -g -fno-omit-frame-pointer -fsanitize=thread -pie -fPIE ${TSAN_CXX_FLAGS}" . && make clean && make -k -j2 && ctest -j2 --output-on-failure ; fi |
| 399 | # - if [[ "${HAS_TSAN}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${SANITIZER_CXX_FLAGS} -g -fno-omit-frame-pointer -fsanitize=thread -pie -fPIE ${TSAN_CXX_FLAGS}" . && make clean && make -k -j2 && ctest -j2 --output-on-failure ; fi |
onqtam | 5cab8e9 | 2016-10-10 17:58:38 +0300 | [diff] [blame] | 400 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 401 | # # test without rtti - just Debug |
| 402 | # - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${CXX_FLAGS} -fno-rtti" . |
| 403 | # - make clean && make -k -j2 |
| 404 | # - cmake -DDOCTEST_TEST_MODE=COMPARE . && ctest -j2 --output-on-failure |
onqtam | f63c510 | 2017-02-25 20:00:52 +0200 | [diff] [blame] | 405 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 406 | # # test only compilation without exceptions - just Debug |
| 407 | # - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${CXX_FLAGS} -fno-exceptions -DDOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS" . |
| 408 | # - make clean && make -k -j2 |
onqtam | 2d93e04 | 2017-03-17 18:57:59 +0200 | [diff] [blame] | 409 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 410 | # # - ccache -s |
onqtam | e4c75fc | 2016-05-21 01:24:48 +0300 | [diff] [blame] | 411 | |
Viktor Kirilov | 0915b9d | 2020-12-16 11:57:51 +0200 | [diff] [blame] | 412 | # #after_script: |
| 413 | # # - cat compile_commands.json |