blob: 31fc42571cc47f12640d49fd6b5c405686a99b34 [file] [log] [blame]
Sean Purcelldaec40d2017-03-07 12:08:15 -08001# Medium Tests: Run on all commits/PRs to dev branch
2
Yann Collet4856a002015-01-24 01:58:16 +01003language: c
Lzu Tao0a25b132018-11-28 13:06:18 +07004
Sean Purcelldaec40d2017-03-07 12:08:15 -08005git:
6 depth: 1
7
8branches:
9 only:
10 - dev
11 - master
Yann Colleted1a4292018-06-27 16:57:28 -070012 - travisTest
Przemyslaw Skibinski0b48a592016-11-14 13:07:45 +010013
Lzu Taob3be8992018-12-14 01:38:06 +070014addons:
15 apt:
16 update: true
17
18env:
19 global:
20 - FUZZERTEST=-T2mn
21 ZSTREAM_TESTTIME=-T2mn
22 DECODECORPUS_TESTTIME=-T1mn
23
Lzu Taob3be8992018-12-14 01:38:06 +070024
25matrix:
26 fast_finish: true
27 include:
Bimba Shrestha1bc56df2020-03-03 15:22:35 -080028 - name: icc
29 compiler: icc
30 env:
31 - C_COMPILER=icc
32 - CXX_COMPILER=icpc
Bimba Shrestha1bc56df2020-03-03 15:22:35 -080033 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 Collet228a6d22019-11-26 10:24:09 -080044 - name: arm64 # ~2.5 mn
Bimba Shrestha4899b6f2019-10-23 10:43:20 -070045 os: linux
46 arch: arm64
47 script:
48 - make check
49
Bimba Shresthaeb76f782020-01-06 14:19:11 -080050 - name: make benchmarking
51 script:
52 - make benchmarking
53
54 - name: make test (complete)
Lzu Taob3be8992018-12-14 01:38:06 +070055 script:
Yann Collet7aaac3f2019-11-25 10:35:36 -080056 # DEVNULLRIGHTS : will request sudo rights to test permissions on /dev/null
57 - DEVNULLRIGHTS=test make test
Lzu Taob3be8992018-12-14 01:38:06 +070058
Yann Colletc6ae2e82020-04-28 18:29:20 -070059 - name: gcc-6 + gcc-7 + libzstdmt compilation # ~ 6mn
Lzu Taob3be8992018-12-14 01:38:06 +070060 script:
Yann Collet7d51e1a2018-12-24 04:15:41 -080061 - make gcc6install gcc7install
Lzu Taob3be8992018-12-14 01:38:06 +070062 - CC=gcc-6 CFLAGS=-Werror make -j all
63 - make clean
Yann Collet7d51e1a2018-12-24 04:15:41 -080064 - CC=gcc-7 CFLAGS=-Werror make -j all
Yann Colletc6ae2e82020-04-28 18:29:20 -070065 - make clean
66 - LDFLAGS=-Wl,--no-undefined make -C lib libzstd-mt
Yann Collet515c2aa2018-12-24 02:56:21 -080067
Yann Collet228a6d22019-11-26 10:24:09 -080068 - name: gcc-8 + ASan + UBSan + Test Zstd # ~6.5mn
Lzu Taob3be8992018-12-14 01:38:06 +070069 script:
70 - make gcc8install
Yann Collet7d51e1a2018-12-24 04:15:41 -080071 - CC=gcc-8 CFLAGS="-Werror" make -j all
72 - make clean
73 - CC=gcc-8 make -j uasan-test-zstd </dev/null # test when stdin is not a tty
74
Yann Collet228a6d22019-11-26 10:24:09 -080075 - name: gcc-6 + ASan + UBSan + Test Zstd, 32bit mode # ~4mn
Yann Collet7d51e1a2018-12-24 04:15:41 -080076 script:
77 - make gcc6install libc6install
78 - CC=gcc-6 CFLAGS="-Werror -m32" make -j all32
79 - make clean
80 - CC=gcc-6 make -j uasan-test-zstd32 # note : can complain about pointer overflow
Yann Collet515c2aa2018-12-24 02:56:21 -080081
Yann Collet228a6d22019-11-26 10:24:09 -080082 - name: clang-3.8 + MSan + Test Zstd # ~3.5mn
Lzu Taob3be8992018-12-14 01:38:06 +070083 script:
84 - make clang38install
Yann Colletbad35bd2019-10-21 12:55:39 -070085 # External libraries must be turned off when using MSAN tests,
86 # because they are not msan-instrumented,
87 # so any data coming from these libraries is always considered "uninitialized"
88 - CC=clang-3.8 make clean msan-test-zstd HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=0
Lzu Taob3be8992018-12-14 01:38:06 +070089
Yann Collet228a6d22019-11-26 10:24:09 -080090 - name: Minimal Decompressor Macros # ~5mn
W. Felix Handte4e2f6c12018-12-05 14:04:57 -080091 script:
92 - make clean
Yann Collet515c2aa2018-12-24 02:56:21 -080093 - CFLAGS=-Werror make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
W. Felix Handte4e2f6c12018-12-05 14:04:57 -080094 - make clean
Yann Collet515c2aa2018-12-24 02:56:21 -080095 - make -j check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
W. Felix Handte4e2f6c12018-12-05 14:04:57 -080096 - make clean
Yann Collet515c2aa2018-12-24 02:56:21 -080097 - CFLAGS=-Werror make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG"
98 - make clean
99 - make -j check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG"
100 - make clean
101 - CFLAGS=-Werror make -j all MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS"
102 - make clean
103 - make -j check MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS"
W. Felix Handte4e2f6c12018-12-05 14:04:57 -0800104
Taylor Braun-Jones5b054d92020-03-23 16:08:52 -0400105 - name: cmake build and test check # ~6mn
Lzu Taob3be8992018-12-14 01:38:06 +0700106 script:
107 - make cmakebuild
108
Yann Collet228a6d22019-11-26 10:24:09 -0800109 - name: static analyzer scanbuild # ~26mn
Yann Collet52dc6ff2019-11-27 14:39:43 -0800110 dist: trusty # note : it's important to pin down a version of static analyzer, since different versions report different false positives
Lzu Taob3be8992018-12-14 01:38:06 +0700111 script:
112 - make staticAnalyze
113
Yann Collet228a6d22019-11-26 10:24:09 -0800114 - name: gcc-8 + ASan + UBSan + Fuzz Test # ~19mn
Lzu Taob3be8992018-12-14 01:38:06 +0700115 script:
Yann Collet7d51e1a2018-12-24 04:15:41 -0800116 - make gcc8install
117 - CC=gcc-8 make clean uasan-fuzztest
Yann Collet515c2aa2018-12-24 02:56:21 -0800118
Yann Collet228a6d22019-11-26 10:24:09 -0800119 - name: gcc-6 + ASan + UBSan + Fuzz Test 32bit # ~15.5mn
Lzu Taob3be8992018-12-14 01:38:06 +0700120 script:
121 - make gcc6install libc6install
Yann Collet7d51e1a2018-12-24 04:15:41 -0800122 - CC=gcc-6 CFLAGS="-O2 -m32" make uasan-fuzztest # can complain about pointer overflow
Yann Collet515c2aa2018-12-24 02:56:21 -0800123
Yann Collet228a6d22019-11-26 10:24:09 -0800124 - name: clang-3.8 + MSan + Fuzz Test # ~14.5mn
Lzu Taob3be8992018-12-14 01:38:06 +0700125 script:
126 - make clang38install
127 - CC=clang-3.8 make clean msan-fuzztest
Yann Collet515c2aa2018-12-24 02:56:21 -0800128
Yann Collet228a6d22019-11-26 10:24:09 -0800129 - name: ASan + UBSan + MSan + Regression Test # ~ 4.5mn
Lzu Taob3be8992018-12-14 01:38:06 +0700130 script:
131 - make -j uasanregressiontest
132 - make clean
133 - make -j msanregressiontest
134
Yann Collet87ae7b92019-11-26 10:30:11 -0800135 - name: C++, gnu90 and c99 compatibility # ~3mn
136 script:
137 - make cxxtest
138 - make clean
139 - make gnu90build
140 - make clean
141 - make c99build
142 - make clean
143 - make travis-install # just ensures `make install` works
144
Yann Colletd6e32af2019-11-27 12:44:02 -0800145 - name: mingw cross-compilation
146 script :
147 - sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix;
Yann Collet52dc6ff2019-11-27 14:39:43 -0800148 - CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CFLAGS="-Werror -O1" make zstd
Yann Colletd6e32af2019-11-27 12:44:02 -0800149
Yann Collet228a6d22019-11-26 10:24:09 -0800150 - name: Valgrind + Fuzz Test Stack Mode # ~ 7mn
Lzu Taob3be8992018-12-14 01:38:06 +0700151 script:
152 - make valgrindinstall
153 - make -C tests clean valgrindTest
154 - make clean
155 - make -C tests test-fuzzer-stackmode
156
Yann Collet228a6d22019-11-26 10:24:09 -0800157 - name: Qemu ARM emulation + Fuzz Test # ~13.5mn
Lzu Taob3be8992018-12-14 01:38:06 +0700158 script:
159 - make arminstall
160 - make armfuzz
Yann Colletc8d1fda2018-12-21 15:08:48 -0800161
W. Felix Handte976c0552019-12-05 17:14:57 -0500162 # Introduced to check compat with old toolchains, to prevent e.g. #1872
163 - name: ARM Build Test (on Trusty)
164 dist: trusty
165 script:
166 - make arminstall
167 - make armbuild
168
Yann Colletecaf3ce2019-11-26 16:44:56 -0800169 - name: Qemu PPC + Fuzz Test # ~13mn
170 dist: trusty # it seems ppc cross-compilation fails on "current"
Lzu Taob3be8992018-12-14 01:38:06 +0700171 script:
172 - make ppcinstall
173 - make ppcfuzz
Yann Colletc8d1fda2018-12-21 15:08:48 -0800174
Yann Collet228a6d22019-11-26 10:24:09 -0800175 # check release number (release only)
Lzu Taob3be8992018-12-14 01:38:06 +0700176 - name: Tag-Specific Test
177 if: tag =~ ^v[0-9]\.[0-9]
178 script:
179 - make -C tests checkTag
180 - tests/checkTag "$TRAVIS_BRANCH"
181
Yann Collet81dab452018-12-24 03:31:40 -0800182 # tests for master branch and cron job only
Yann Collet228a6d22019-11-26 10:24:09 -0800183 - name: OS-X # ~13mn
Yann Collet37466932019-12-14 13:29:24 -0800184 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800185 os: osx
186 script:
187 - make test
188
Bimba Shrestha6a4258a2020-02-05 16:55:00 -0800189 - name: zbuff test
190 if: branch = master
191 script:
192 - make test-zbuff
193
Yann Collet1d7adee2019-11-26 10:28:21 -0800194 - name: Versions Compatibility Test # 11.5mn
195 if: branch = master
196 script:
197 - make -C tests versionsTest
198
Yann Collet228a6d22019-11-26 10:24:09 -0800199 - name: thread sanitizer # ~29mn
Yann Collet66b21b62018-12-24 03:44:57 -0800200 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800201 script:
202 - make clang38install
203 - CC=clang-3.8 make tsan-test-zstream
Yann Collet7d51e1a2018-12-24 04:15:41 -0800204 - CC=clang-3.8 make tsan-fuzztest
Yann Collet81dab452018-12-24 03:31:40 -0800205
Yann Collet37466932019-12-14 13:29:24 -0800206 - name: Qemu PPC64 + Fuzz test # ~13mn
Yann Collet7d51e1a2018-12-24 04:15:41 -0800207 if: branch = master
208 script:
209 - make ppcinstall
210 - make ppc64fuzz
211
Yann Collet37466932019-12-14 13:29:24 -0800212 - name: PPC64LE + Fuzz test # ~13mn
213 if: branch = master
214 arch: ppc64le
215 script:
216 - cat /proc/cpuinfo
217 - make test
218
Yann Colletd6e32af2019-11-27 12:44:02 -0800219 # 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 Collet228a6d22019-11-26 10:24:09 -0800227 - name: zlib wrapper test # ~7.5mn
Yann Collet66b21b62018-12-24 03:44:57 -0800228 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800229 script:
230 - make gpp6install valgrindinstall
231 - make -C zlibWrapper test
232 - make -C zlibWrapper valgrindTest
233
Yann Collet228a6d22019-11-26 10:24:09 -0800234 - name: LZ4, thread pool, and partial libs tests # ~2mn
Yann Collet7d51e1a2018-12-24 04:15:41 -0800235 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 Collet81dab452018-12-24 03:31:40 -0800244 # meson dedicated test
Yann Collet228a6d22019-11-26 10:24:09 -0800245 - name: Xenial (Meson + clang) # ~8mn
246 if: branch = master
Lzu Taob3be8992018-12-14 01:38:06 +0700247 dist: xenial
248 language: cpp
249 compiler: clang
Lzu Tao889a4922018-12-28 10:07:05 +0700250 install:
Lzu Taob3be8992018-12-14 01:38:06 +0700251 - sudo apt-get install -qq liblz4-dev valgrind tree
Lzu Tao4d156852019-06-29 01:42:17 +0700252 - |
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 Taob3be8992018-12-14 01:38:06 +0700259 script:
Lzu Tao4d156852019-06-29 01:42:17 +0700260 - |
261 meson setup \
262 --buildtype=debugoptimized \
263 -Db_lundef=false \
264 -Dauto_features=enabled \
Lzu Tao8e590a12019-06-29 01:59:57 +0700265 -Dbin_programs=true \
266 -Dbin_tests=true \
267 -Dbin_contrib=true \
Lzu Tao4d156852019-06-29 01:42:17 +0700268 -Ddefault_library=both \
lzutao1d70bc32019-05-03 02:35:37 +0700269 build/meson builddir
Lzu Tao5d900ff2019-04-30 13:12:00 +0700270 - pushd builddir
lzutao1d70bc32019-05-03 02:35:37 +0700271 - ninja
272 - meson test --verbose --no-rebuild
Lzu Taob3be8992018-12-14 01:38:06 +0700273 - DESTDIR=./staging ninja install
274 - tree ./staging
lzutao1d70bc32019-05-03 02:35:37 +0700275 after_failure:
276 - cat "$TRAVIS_BUILD_DIR"/builddir/meson-logs/testlog.txt
Bimba Shrestha5228c072019-10-22 17:43:29 -0700277
Lzu Taob3be8992018-12-14 01:38:06 +0700278 allow_failures:
Lzu Tao889a4922018-12-28 10:07:05 +0700279 - env: ALLOW_FAILURES=true