Sean Purcell | daec40d | 2017-03-07 12:08:15 -0800 | [diff] [blame] | 1 | # Medium Tests: Run on all commits/PRs to dev branch |
| 2 | |
Yann Collet | 4856a00 | 2015-01-24 01:58:16 +0100 | [diff] [blame] | 3 | language: c |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame] | 4 | |
Sean Purcell | daec40d | 2017-03-07 12:08:15 -0800 | [diff] [blame] | 5 | git: |
| 6 | depth: 1 |
| 7 | |
| 8 | branches: |
| 9 | only: |
| 10 | - dev |
| 11 | - master |
Yann Collet | ed1a429 | 2018-06-27 16:57:28 -0700 | [diff] [blame] | 12 | - travisTest |
Przemyslaw Skibinski | 0b48a59 | 2016-11-14 13:07:45 +0100 | [diff] [blame] | 13 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 14 | addons: |
| 15 | apt: |
| 16 | update: true |
| 17 | |
| 18 | env: |
| 19 | global: |
| 20 | - FUZZERTEST=-T2mn |
| 21 | ZSTREAM_TESTTIME=-T2mn |
| 22 | DECODECORPUS_TESTTIME=-T1mn |
| 23 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 24 | |
| 25 | matrix: |
| 26 | fast_finish: true |
| 27 | include: |
Bimba Shrestha | 1bc56df | 2020-03-03 15:22:35 -0800 | [diff] [blame] | 28 | - name: icc |
| 29 | compiler: icc |
| 30 | env: |
| 31 | - C_COMPILER=icc |
| 32 | - CXX_COMPILER=icpc |
Bimba Shrestha | 1bc56df | 2020-03-03 15:22:35 -0800 | [diff] [blame] | 33 | install: |
| 34 | - source /opt/intel/inteloneapi/compiler/latest/env/vars.sh |
| 35 | addons: |
| 36 | apt: |
| 37 | sources: |
| 38 | - sourceline: 'deb https://apt.repos.intel.com/oneapi all main' |
| 39 | key_url: 'https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB' |
| 40 | packages: |
| 41 | - intel-oneapi-icc |
| 42 | script: make check |
| 43 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 44 | - name: arm64 # ~2.5 mn |
Bimba Shrestha | 4899b6f | 2019-10-23 10:43:20 -0700 | [diff] [blame] | 45 | os: linux |
| 46 | arch: arm64 |
| 47 | script: |
| 48 | - make check |
| 49 | |
Bimba Shrestha | eb76f78 | 2020-01-06 14:19:11 -0800 | [diff] [blame] | 50 | - name: make benchmarking |
| 51 | script: |
| 52 | - make benchmarking |
| 53 | |
| 54 | - name: make test (complete) |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 55 | script: |
Yann Collet | 7aaac3f | 2019-11-25 10:35:36 -0800 | [diff] [blame] | 56 | # DEVNULLRIGHTS : will request sudo rights to test permissions on /dev/null |
| 57 | - DEVNULLRIGHTS=test make test |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 58 | |
Yann Collet | c6ae2e8 | 2020-04-28 18:29:20 -0700 | [diff] [blame] | 59 | - name: gcc-6 + gcc-7 + libzstdmt compilation # ~ 6mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 60 | script: |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 61 | - make gcc6install gcc7install |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 62 | - CC=gcc-6 CFLAGS=-Werror make -j all |
| 63 | - make clean |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 64 | - CC=gcc-7 CFLAGS=-Werror make -j all |
Yann Collet | c6ae2e8 | 2020-04-28 18:29:20 -0700 | [diff] [blame] | 65 | - make clean |
| 66 | - LDFLAGS=-Wl,--no-undefined make -C lib libzstd-mt |
Yann Collet | 7ea2ae6 | 2020-04-28 21:18:29 -0700 | [diff] [blame] | 67 | - make -C tests zbufftest-dll |
| 68 | # LDFLAGS=-Wl,--no-undefined : will make the linker fail if dll is underlinked |
| 69 | # zbufftest-dll : test that a user program can link to multi-threaded libzstd without specifying -pthread |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 70 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 71 | - name: gcc-8 + ASan + UBSan + Test Zstd # ~6.5mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 72 | script: |
| 73 | - make gcc8install |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 74 | - CC=gcc-8 CFLAGS="-Werror" make -j all |
| 75 | - make clean |
| 76 | - CC=gcc-8 make -j uasan-test-zstd </dev/null # test when stdin is not a tty |
| 77 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 78 | - name: gcc-6 + ASan + UBSan + Test Zstd, 32bit mode # ~4mn |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 79 | script: |
| 80 | - make gcc6install libc6install |
| 81 | - CC=gcc-6 CFLAGS="-Werror -m32" make -j all32 |
| 82 | - make clean |
| 83 | - CC=gcc-6 make -j uasan-test-zstd32 # note : can complain about pointer overflow |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 84 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 85 | - name: clang-3.8 + MSan + Test Zstd # ~3.5mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 86 | script: |
| 87 | - make clang38install |
Yann Collet | bad35bd | 2019-10-21 12:55:39 -0700 | [diff] [blame] | 88 | # External libraries must be turned off when using MSAN tests, |
| 89 | # because they are not msan-instrumented, |
| 90 | # so any data coming from these libraries is always considered "uninitialized" |
| 91 | - CC=clang-3.8 make clean msan-test-zstd HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=0 |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 92 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 93 | - name: Minimal Decompressor Macros # ~5mn |
W. Felix Handte | 4e2f6c1 | 2018-12-05 14:04:57 -0800 | [diff] [blame] | 94 | script: |
| 95 | - make clean |
W. Felix Handte | 0b81035 | 2020-05-04 11:22:07 -0400 | [diff] [blame] | 96 | - make -j all check ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror" |
W. Felix Handte | 4e2f6c1 | 2018-12-05 14:04:57 -0800 | [diff] [blame] | 97 | - make clean |
W. Felix Handte | 0b81035 | 2020-05-04 11:22:07 -0400 | [diff] [blame] | 98 | - make -j all check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT" |
W. Felix Handte | 4e2f6c1 | 2018-12-05 14:04:57 -0800 | [diff] [blame] | 99 | - make clean |
W. Felix Handte | 0b81035 | 2020-05-04 11:22:07 -0400 | [diff] [blame] | 100 | - make -j all check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG" |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 101 | - make clean |
W. Felix Handte | 0b81035 | 2020-05-04 11:22:07 -0400 | [diff] [blame] | 102 | - make -j all check MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS" |
W. Felix Handte | 4e2f6c1 | 2018-12-05 14:04:57 -0800 | [diff] [blame] | 103 | |
Taylor Braun-Jones | 5b054d9 | 2020-03-23 16:08:52 -0400 | [diff] [blame] | 104 | - name: cmake build and test check # ~6mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 105 | script: |
| 106 | - make cmakebuild |
| 107 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 108 | - name: static analyzer scanbuild # ~26mn |
Yann Collet | 52dc6ff | 2019-11-27 14:39:43 -0800 | [diff] [blame] | 109 | dist: trusty # note : it's important to pin down a version of static analyzer, since different versions report different false positives |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 110 | script: |
| 111 | - make staticAnalyze |
| 112 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 113 | - name: gcc-8 + ASan + UBSan + Fuzz Test # ~19mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 114 | script: |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 115 | - make gcc8install |
| 116 | - CC=gcc-8 make clean uasan-fuzztest |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 117 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 118 | - name: gcc-6 + ASan + UBSan + Fuzz Test 32bit # ~15.5mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 119 | script: |
| 120 | - make gcc6install libc6install |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 121 | - CC=gcc-6 CFLAGS="-O2 -m32" make uasan-fuzztest # can complain about pointer overflow |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 122 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 123 | - name: clang-3.8 + MSan + Fuzz Test # ~14.5mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 124 | script: |
| 125 | - make clang38install |
| 126 | - CC=clang-3.8 make clean msan-fuzztest |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 127 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 128 | - name: ASan + UBSan + MSan + Regression Test # ~ 4.5mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 129 | script: |
| 130 | - make -j uasanregressiontest |
| 131 | - make clean |
| 132 | - make -j msanregressiontest |
| 133 | |
Yann Collet | 87ae7b9 | 2019-11-26 10:30:11 -0800 | [diff] [blame] | 134 | - name: C++, gnu90 and c99 compatibility # ~3mn |
| 135 | script: |
| 136 | - make cxxtest |
| 137 | - make clean |
| 138 | - make gnu90build |
| 139 | - make clean |
| 140 | - make c99build |
| 141 | - make clean |
| 142 | - make travis-install # just ensures `make install` works |
| 143 | |
Yann Collet | d6e32af | 2019-11-27 12:44:02 -0800 | [diff] [blame] | 144 | - name: mingw cross-compilation |
| 145 | script : |
| 146 | - sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; |
Yann Collet | 52dc6ff | 2019-11-27 14:39:43 -0800 | [diff] [blame] | 147 | - CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CFLAGS="-Werror -O1" make zstd |
Yann Collet | d6e32af | 2019-11-27 12:44:02 -0800 | [diff] [blame] | 148 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 149 | - name: Valgrind + Fuzz Test Stack Mode # ~ 7mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 150 | script: |
| 151 | - make valgrindinstall |
| 152 | - make -C tests clean valgrindTest |
| 153 | - make clean |
| 154 | - make -C tests test-fuzzer-stackmode |
| 155 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 156 | - name: Qemu ARM emulation + Fuzz Test # ~13.5mn |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 157 | script: |
| 158 | - make arminstall |
| 159 | - make armfuzz |
Yann Collet | c8d1fda | 2018-12-21 15:08:48 -0800 | [diff] [blame] | 160 | |
W. Felix Handte | 976c055 | 2019-12-05 17:14:57 -0500 | [diff] [blame] | 161 | # Introduced to check compat with old toolchains, to prevent e.g. #1872 |
| 162 | - name: ARM Build Test (on Trusty) |
| 163 | dist: trusty |
| 164 | script: |
| 165 | - make arminstall |
| 166 | - make armbuild |
| 167 | |
Yann Collet | ecaf3ce | 2019-11-26 16:44:56 -0800 | [diff] [blame] | 168 | - name: Qemu PPC + Fuzz Test # ~13mn |
| 169 | dist: trusty # it seems ppc cross-compilation fails on "current" |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 170 | script: |
| 171 | - make ppcinstall |
| 172 | - make ppcfuzz |
Yann Collet | c8d1fda | 2018-12-21 15:08:48 -0800 | [diff] [blame] | 173 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 174 | # check release number (release only) |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 175 | - name: Tag-Specific Test |
| 176 | if: tag =~ ^v[0-9]\.[0-9] |
| 177 | script: |
| 178 | - make -C tests checkTag |
| 179 | - tests/checkTag "$TRAVIS_BRANCH" |
| 180 | |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 181 | # tests for master branch and cron job only |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 182 | - name: OS-X # ~13mn |
Yann Collet | 3746693 | 2019-12-14 13:29:24 -0800 | [diff] [blame] | 183 | if: branch = master |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 184 | os: osx |
| 185 | script: |
| 186 | - make test |
W. Felix Handte | 85801b9 | 2020-05-08 13:10:20 -0400 | [diff] [blame] | 187 | - make -C lib all |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 188 | |
Bimba Shrestha | 6a4258a | 2020-02-05 16:55:00 -0800 | [diff] [blame] | 189 | - name: zbuff test |
| 190 | if: branch = master |
| 191 | script: |
| 192 | - make test-zbuff |
| 193 | |
Yann Collet | 1d7adee | 2019-11-26 10:28:21 -0800 | [diff] [blame] | 194 | - name: Versions Compatibility Test # 11.5mn |
| 195 | if: branch = master |
| 196 | script: |
| 197 | - make -C tests versionsTest |
| 198 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 199 | - name: thread sanitizer # ~29mn |
Yann Collet | 66b21b6 | 2018-12-24 03:44:57 -0800 | [diff] [blame] | 200 | if: branch = master |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 201 | script: |
| 202 | - make clang38install |
| 203 | - CC=clang-3.8 make tsan-test-zstream |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 204 | - CC=clang-3.8 make tsan-fuzztest |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 205 | |
Yann Collet | 3746693 | 2019-12-14 13:29:24 -0800 | [diff] [blame] | 206 | - name: Qemu PPC64 + Fuzz test # ~13mn |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 207 | if: branch = master |
| 208 | script: |
| 209 | - make ppcinstall |
| 210 | - make ppc64fuzz |
| 211 | |
Yann Collet | 3746693 | 2019-12-14 13:29:24 -0800 | [diff] [blame] | 212 | - name: PPC64LE + Fuzz test # ~13mn |
| 213 | if: branch = master |
| 214 | arch: ppc64le |
| 215 | script: |
| 216 | - cat /proc/cpuinfo |
| 217 | - make test |
| 218 | |
Yann Collet | d6e32af | 2019-11-27 12:44:02 -0800 | [diff] [blame] | 219 | # note : we already have aarch64 tests on hardware |
| 220 | - name: Qemu aarch64 + Fuzz Test (on Xenial) # ~14mn |
| 221 | if: branch = master |
| 222 | dist: xenial |
| 223 | script: |
| 224 | - make arminstall |
| 225 | - make aarch64fuzz |
| 226 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 227 | - name: zlib wrapper test # ~7.5mn |
Yann Collet | 66b21b6 | 2018-12-24 03:44:57 -0800 | [diff] [blame] | 228 | if: branch = master |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 229 | script: |
| 230 | - make gpp6install valgrindinstall |
| 231 | - make -C zlibWrapper test |
| 232 | - make -C zlibWrapper valgrindTest |
| 233 | |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 234 | - name: LZ4, thread pool, and partial libs tests # ~2mn |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 235 | if: branch = master |
| 236 | script: |
| 237 | - make lz4install |
| 238 | - make -C tests test-lz4 |
| 239 | - make clean |
| 240 | - make -C tests test-pool |
| 241 | - make clean |
| 242 | - bash tests/libzstd_partial_builds.sh |
| 243 | |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 244 | # meson dedicated test |
Yann Collet | 228a6d2 | 2019-11-26 10:24:09 -0800 | [diff] [blame] | 245 | - name: Xenial (Meson + clang) # ~8mn |
| 246 | if: branch = master |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 247 | dist: xenial |
| 248 | language: cpp |
| 249 | compiler: clang |
Lzu Tao | 889a492 | 2018-12-28 10:07:05 +0700 | [diff] [blame] | 250 | install: |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 251 | - sudo apt-get install -qq liblz4-dev valgrind tree |
Lzu Tao | 4d15685 | 2019-06-29 01:42:17 +0700 | [diff] [blame] | 252 | - | |
| 253 | travis_retry curl -o ~/ninja.zip -L 'https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip' && |
| 254 | unzip ~/ninja.zip -d ~/.local/bin |
| 255 | - | |
| 256 | travis_retry curl -o ~/get-pip.py -L 'https://bootstrap.pypa.io/get-pip.py' && |
| 257 | python3 ~/get-pip.py --user && |
| 258 | pip3 install --user meson |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 259 | script: |
Lzu Tao | 4d15685 | 2019-06-29 01:42:17 +0700 | [diff] [blame] | 260 | - | |
| 261 | meson setup \ |
| 262 | --buildtype=debugoptimized \ |
| 263 | -Db_lundef=false \ |
| 264 | -Dauto_features=enabled \ |
Lzu Tao | 8e590a1 | 2019-06-29 01:59:57 +0700 | [diff] [blame] | 265 | -Dbin_programs=true \ |
| 266 | -Dbin_tests=true \ |
| 267 | -Dbin_contrib=true \ |
Lzu Tao | 4d15685 | 2019-06-29 01:42:17 +0700 | [diff] [blame] | 268 | -Ddefault_library=both \ |
lzutao | 1d70bc3 | 2019-05-03 02:35:37 +0700 | [diff] [blame] | 269 | build/meson builddir |
Lzu Tao | 5d900ff | 2019-04-30 13:12:00 +0700 | [diff] [blame] | 270 | - pushd builddir |
lzutao | 1d70bc3 | 2019-05-03 02:35:37 +0700 | [diff] [blame] | 271 | - ninja |
| 272 | - meson test --verbose --no-rebuild |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 273 | - DESTDIR=./staging ninja install |
| 274 | - tree ./staging |
lzutao | 1d70bc3 | 2019-05-03 02:35:37 +0700 | [diff] [blame] | 275 | after_failure: |
| 276 | - cat "$TRAVIS_BUILD_DIR"/builddir/meson-logs/testlog.txt |
Bimba Shrestha | 5228c07 | 2019-10-22 17:43:29 -0700 | [diff] [blame] | 277 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 278 | allow_failures: |
Lzu Tao | 889a492 | 2018-12-28 10:07:05 +0700 | [diff] [blame] | 279 | - env: ALLOW_FAILURES=true |