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