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 |
Przemyslaw Skibinski | 2e8ae51 | 2017-02-22 09:21:04 +0100 | [diff] [blame] | 4 | dist: trusty |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame] | 5 | |
Sean Purcell | daec40d | 2017-03-07 12:08:15 -0800 | [diff] [blame] | 6 | git: |
| 7 | depth: 1 |
| 8 | |
| 9 | branches: |
| 10 | only: |
| 11 | - dev |
| 12 | - master |
Yann Collet | ed1a429 | 2018-06-27 16:57:28 -0700 | [diff] [blame] | 13 | - travisTest |
Przemyslaw Skibinski | 0b48a59 | 2016-11-14 13:07:45 +0100 | [diff] [blame] | 14 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 15 | addons: |
| 16 | apt: |
| 17 | update: true |
| 18 | |
| 19 | env: |
| 20 | global: |
| 21 | - FUZZERTEST=-T2mn |
| 22 | ZSTREAM_TESTTIME=-T2mn |
| 23 | DECODECORPUS_TESTTIME=-T1mn |
| 24 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 25 | |
| 26 | matrix: |
| 27 | fast_finish: true |
| 28 | include: |
| 29 | - name: Trusty (Test All) |
| 30 | script: |
| 31 | - make test |
| 32 | |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 33 | - name: gcc-6 + gcc-7 compilation |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 34 | script: |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 35 | - make gcc6install gcc7install |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 36 | - CC=gcc-6 CFLAGS=-Werror make -j all |
| 37 | - make clean |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 38 | - CC=gcc-7 CFLAGS=-Werror make -j all |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 39 | |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 40 | - name: gcc-8 + ASan + UBSan + Test Zstd |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 41 | script: |
| 42 | - make gcc8install |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 43 | - CC=gcc-8 CFLAGS="-Werror" make -j all |
| 44 | - make clean |
| 45 | - CC=gcc-8 make -j uasan-test-zstd </dev/null # test when stdin is not a tty |
| 46 | |
| 47 | - name: gcc-6 + ASan + UBSan + Test Zstd, 32bit mode |
| 48 | script: |
| 49 | - make gcc6install libc6install |
| 50 | - CC=gcc-6 CFLAGS="-Werror -m32" make -j all32 |
| 51 | - make clean |
| 52 | - 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] | 53 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 54 | - name: Trusty (clang-3.8 + MSan + Test Zstd) |
| 55 | script: |
| 56 | - make clang38install |
| 57 | - CC=clang-3.8 make clean msan-test-zstd |
| 58 | |
W. Felix Handte | 4e2f6c1 | 2018-12-05 14:04:57 -0800 | [diff] [blame] | 59 | - name: Trusty (Minimal Decompressor Macros) |
| 60 | script: |
| 61 | - make clean |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 62 | - CFLAGS=-Werror make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT" |
W. Felix Handte | 4e2f6c1 | 2018-12-05 14:04:57 -0800 | [diff] [blame] | 63 | - make clean |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 64 | - make -j 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] | 65 | - make clean |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 66 | - CFLAGS=-Werror make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG" |
| 67 | - make clean |
| 68 | - make -j check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG" |
| 69 | - make clean |
| 70 | - CFLAGS=-Werror make -j all MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS" |
| 71 | - make clean |
| 72 | - make -j check MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS" |
W. Felix Handte | 4e2f6c1 | 2018-12-05 14:04:57 -0800 | [diff] [blame] | 73 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 74 | - name: Trusty (CMake) |
| 75 | script: |
| 76 | - make cmakebuild |
| 77 | |
| 78 | - name: Trusty (Static Analyze) |
| 79 | script: |
| 80 | - make staticAnalyze |
| 81 | |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 82 | - name: Trusty (gcc-8 + ASan + UBSan + Fuzz Test) |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 83 | script: |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 84 | - make gcc8install |
| 85 | - CC=gcc-8 make clean uasan-fuzztest |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 86 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 87 | - name: Trusty (gcc-6 + ASan + UBSan + Fuzz Test 32bit) |
| 88 | script: |
| 89 | - make gcc6install libc6install |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 90 | - 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] | 91 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 92 | - name: Trusty (clang-3.8 + MSan + Fuzz Test) |
| 93 | script: |
| 94 | - make clang38install |
| 95 | - CC=clang-3.8 make clean msan-fuzztest |
Yann Collet | 515c2aa | 2018-12-24 02:56:21 -0800 | [diff] [blame] | 96 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 97 | - name: Trusty (ASan + UBSan + MSan + Regression Test) |
| 98 | script: |
| 99 | - make -j uasanregressiontest |
| 100 | - make clean |
| 101 | - make -j msanregressiontest |
| 102 | |
| 103 | - name: Trusty (Valgrind + Fuzz Test Stack Mode) |
| 104 | script: |
| 105 | - make valgrindinstall |
| 106 | - make -C tests clean valgrindTest |
| 107 | - make clean |
| 108 | - make -C tests test-fuzzer-stackmode |
| 109 | |
| 110 | - name: Trusty (ARM + Fuzz Test) |
| 111 | script: |
| 112 | - make arminstall |
| 113 | - make armfuzz |
Yann Collet | c8d1fda | 2018-12-21 15:08:48 -0800 | [diff] [blame] | 114 | |
| 115 | - name: Xenial (AARCH64 + Fuzz Test) |
| 116 | dist: xenial |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 117 | script: |
| 118 | - make arminstall |
| 119 | - make aarch64fuzz |
Yann Collet | c8d1fda | 2018-12-21 15:08:48 -0800 | [diff] [blame] | 120 | |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 121 | - name: Trusty (PPC + Fuzz Test) |
| 122 | script: |
| 123 | - make ppcinstall |
| 124 | - make ppcfuzz |
Yann Collet | c8d1fda | 2018-12-21 15:08:48 -0800 | [diff] [blame] | 125 | |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 126 | # check release number |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 127 | - name: Tag-Specific Test |
| 128 | if: tag =~ ^v[0-9]\.[0-9] |
| 129 | script: |
| 130 | - make -C tests checkTag |
| 131 | - tests/checkTag "$TRAVIS_BRANCH" |
| 132 | |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 133 | # tests for master branch and cron job only |
| 134 | - name: OS-X |
Yann Collet | 66b21b6 | 2018-12-24 03:44:57 -0800 | [diff] [blame] | 135 | if: branch = master |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 136 | os: osx |
| 137 | script: |
| 138 | - make test |
| 139 | |
| 140 | - name: thread sanitizer |
Yann Collet | 66b21b6 | 2018-12-24 03:44:57 -0800 | [diff] [blame] | 141 | if: branch = master |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 142 | script: |
| 143 | - make clang38install |
| 144 | - CC=clang-3.8 make tsan-test-zstream |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 145 | - CC=clang-3.8 make tsan-fuzztest |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 146 | |
Yann Collet | 66b21b6 | 2018-12-24 03:44:57 -0800 | [diff] [blame] | 147 | - name: C++ and gnu90 compatibility |
| 148 | if: branch = master |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 149 | script: |
| 150 | - make cxxtest |
| 151 | - make clean |
| 152 | - make gnu90build |
| 153 | - make clean |
Yann Collet | 66b21b6 | 2018-12-24 03:44:57 -0800 | [diff] [blame] | 154 | - make travis-install # just ensures `make install` works |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 155 | |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 156 | - name: PPC64 |
| 157 | if: branch = master |
| 158 | script: |
| 159 | - make ppcinstall |
| 160 | - make ppc64fuzz |
| 161 | |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 162 | - name: zlib wrapper test |
Yann Collet | 66b21b6 | 2018-12-24 03:44:57 -0800 | [diff] [blame] | 163 | if: branch = master |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 164 | script: |
| 165 | - make gpp6install valgrindinstall |
| 166 | - make -C zlibWrapper test |
| 167 | - make -C zlibWrapper valgrindTest |
| 168 | |
Yann Collet | 7d51e1a | 2018-12-24 04:15:41 -0800 | [diff] [blame] | 169 | - name: LZ4, thread pool, and partial libs tests |
| 170 | if: branch = master |
| 171 | script: |
| 172 | - make lz4install |
| 173 | - make -C tests test-lz4 |
| 174 | - make clean |
| 175 | - make -C tests test-pool |
| 176 | - make clean |
| 177 | - bash tests/libzstd_partial_builds.sh |
| 178 | |
Yann Collet | 81dab45 | 2018-12-24 03:31:40 -0800 | [diff] [blame] | 179 | # meson dedicated test |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 180 | - name: Xenial (Meson + clang) |
Lzu Tao | 889a492 | 2018-12-28 10:07:05 +0700 | [diff] [blame] | 181 | env: ALLOW_FAILURES=true |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 182 | dist: xenial |
| 183 | language: cpp |
| 184 | compiler: clang |
Lzu Tao | 889a492 | 2018-12-28 10:07:05 +0700 | [diff] [blame] | 185 | install: |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 186 | - sudo apt-get install -qq liblz4-dev valgrind tree |
Lzu Tao | 889a492 | 2018-12-28 10:07:05 +0700 | [diff] [blame] | 187 | - travis_retry curl -o ~/ninja.zip -L 'https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip' |
| 188 | && unzip ~/ninja.zip -d ~/.local/bin |
| 189 | - travis_retry curl -o ~/get-pip.py -L 'https://bootstrap.pypa.io/get-pip.py' |
| 190 | && python3 ~/get-pip.py --user |
| 191 | && pip3 install --user meson |
Lzu Tao | b3be899 | 2018-12-14 01:38:06 +0700 | [diff] [blame] | 192 | script: |
| 193 | - meson --buildtype=debug |
| 194 | -Db_lundef=false |
| 195 | -Dauto_features=enabled |
| 196 | -Dbuild_{programs,tests,contrib}=true |
| 197 | -Ddefault_library=both |
| 198 | build/meson builddir |
| 199 | - cd builddir |
| 200 | - DESTDIR=./staging ninja install |
| 201 | - tree ./staging |
| 202 | allow_failures: |
Lzu Tao | 889a492 | 2018-12-28 10:07:05 +0700 | [diff] [blame] | 203 | - env: ALLOW_FAILURES=true |