blob: 351979905969001b11076d406a5c34c38a59666b [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
Przemyslaw Skibinski2e8ae512017-02-22 09:21:04 +01004dist: trusty
W. Felix Handtee26be5a2018-05-14 11:55:21 -04005sudo: required
Lzu Tao0a25b132018-11-28 13:06:18 +07006
Sean Purcelldaec40d2017-03-07 12:08:15 -08007git:
8 depth: 1
9
10branches:
11 only:
12 - dev
13 - master
Yann Colleted1a4292018-06-27 16:57:28 -070014 - travisTest
Przemyslaw Skibinski0b48a592016-11-14 13:07:45 +010015
Lzu Taob3be8992018-12-14 01:38:06 +070016addons:
17 apt:
18 update: true
19
20env:
21 global:
22 - FUZZERTEST=-T2mn
23 ZSTREAM_TESTTIME=-T2mn
24 DECODECORPUS_TESTTIME=-T1mn
25
Lzu Taob3be8992018-12-14 01:38:06 +070026
27matrix:
28 fast_finish: true
29 include:
30 - name: Trusty (Test All)
31 script:
32 - make test
33
Yann Collet7d51e1a2018-12-24 04:15:41 -080034 - name: gcc-6 + gcc-7 compilation
Lzu Taob3be8992018-12-14 01:38:06 +070035 script:
Yann Collet7d51e1a2018-12-24 04:15:41 -080036 - make gcc6install gcc7install
Lzu Taob3be8992018-12-14 01:38:06 +070037 - CC=gcc-6 CFLAGS=-Werror make -j all
38 - make clean
Yann Collet7d51e1a2018-12-24 04:15:41 -080039 - CC=gcc-7 CFLAGS=-Werror make -j all
Yann Collet515c2aa2018-12-24 02:56:21 -080040
Yann Collet7d51e1a2018-12-24 04:15:41 -080041 - name: gcc-8 + ASan + UBSan + Test Zstd
Lzu Taob3be8992018-12-14 01:38:06 +070042 script:
43 - make gcc8install
Yann Collet7d51e1a2018-12-24 04:15:41 -080044 - 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 Collet515c2aa2018-12-24 02:56:21 -080054
Lzu Taob3be8992018-12-14 01:38:06 +070055 - 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 Handte4e2f6c12018-12-05 14:04:57 -080060 - name: Trusty (Minimal Decompressor Macros)
61 script:
62 - make clean
Yann Collet515c2aa2018-12-24 02:56:21 -080063 - CFLAGS=-Werror make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
W. Felix Handte4e2f6c12018-12-05 14:04:57 -080064 - make clean
Yann Collet515c2aa2018-12-24 02:56:21 -080065 - make -j check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
W. Felix Handte4e2f6c12018-12-05 14:04:57 -080066 - make clean
Yann Collet515c2aa2018-12-24 02:56:21 -080067 - 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 Handte4e2f6c12018-12-05 14:04:57 -080074
Lzu Taob3be8992018-12-14 01:38:06 +070075 - name: Trusty (CMake)
76 script:
77 - make cmakebuild
78
79 - name: Trusty (Static Analyze)
80 script:
81 - make staticAnalyze
82
Yann Collet7d51e1a2018-12-24 04:15:41 -080083 - name: Trusty (gcc-8 + ASan + UBSan + Fuzz Test)
Lzu Taob3be8992018-12-14 01:38:06 +070084 script:
Yann Collet7d51e1a2018-12-24 04:15:41 -080085 - make gcc8install
86 - CC=gcc-8 make clean uasan-fuzztest
Yann Collet515c2aa2018-12-24 02:56:21 -080087
Lzu Taob3be8992018-12-14 01:38:06 +070088 - name: Trusty (gcc-6 + ASan + UBSan + Fuzz Test 32bit)
89 script:
90 - make gcc6install libc6install
Yann Collet7d51e1a2018-12-24 04:15:41 -080091 - CC=gcc-6 CFLAGS="-O2 -m32" make uasan-fuzztest # can complain about pointer overflow
Yann Collet515c2aa2018-12-24 02:56:21 -080092
Lzu Taob3be8992018-12-14 01:38:06 +070093 - name: Trusty (clang-3.8 + MSan + Fuzz Test)
94 script:
95 - make clang38install
96 - CC=clang-3.8 make clean msan-fuzztest
Yann Collet515c2aa2018-12-24 02:56:21 -080097
Lzu Taob3be8992018-12-14 01:38:06 +070098 - 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 Colletc8d1fda2018-12-21 15:08:48 -0800115
116 - name: Xenial (AARCH64 + Fuzz Test)
117 dist: xenial
Lzu Taob3be8992018-12-14 01:38:06 +0700118 script:
119 - make arminstall
120 - make aarch64fuzz
Yann Colletc8d1fda2018-12-21 15:08:48 -0800121
Lzu Taob3be8992018-12-14 01:38:06 +0700122 - name: Trusty (PPC + Fuzz Test)
123 script:
124 - make ppcinstall
125 - make ppcfuzz
Yann Colletc8d1fda2018-12-21 15:08:48 -0800126
Yann Collet81dab452018-12-24 03:31:40 -0800127 # check release number
Lzu Taob3be8992018-12-14 01:38:06 +0700128 - 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 Collet81dab452018-12-24 03:31:40 -0800134 # tests for master branch and cron job only
135 - name: OS-X
Yann Collet66b21b62018-12-24 03:44:57 -0800136 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800137 os: osx
138 script:
139 - make test
140
141 - name: thread sanitizer
Yann Collet66b21b62018-12-24 03:44:57 -0800142 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800143 script:
144 - make clang38install
145 - CC=clang-3.8 make tsan-test-zstream
Yann Collet7d51e1a2018-12-24 04:15:41 -0800146 - CC=clang-3.8 make tsan-fuzztest
Yann Collet81dab452018-12-24 03:31:40 -0800147
Yann Collet66b21b62018-12-24 03:44:57 -0800148 - name: C++ and gnu90 compatibility
149 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800150 script:
151 - make cxxtest
152 - make clean
153 - make gnu90build
154 - make clean
Yann Collet66b21b62018-12-24 03:44:57 -0800155 - make travis-install # just ensures `make install` works
Yann Collet81dab452018-12-24 03:31:40 -0800156
Yann Collet7d51e1a2018-12-24 04:15:41 -0800157 - name: PPC64
158 if: branch = master
159 script:
160 - make ppcinstall
161 - make ppc64fuzz
162
Yann Collet81dab452018-12-24 03:31:40 -0800163 - name: zlib wrapper test
Yann Collet66b21b62018-12-24 03:44:57 -0800164 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800165 script:
166 - make gpp6install valgrindinstall
167 - make -C zlibWrapper test
168 - make -C zlibWrapper valgrindTest
169
Yann Collet7d51e1a2018-12-24 04:15:41 -0800170 - 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 Collet81dab452018-12-24 03:31:40 -0800180 # meson dedicated test
Lzu Taob3be8992018-12-14 01:38:06 +0700181 - name: Xenial (Meson + clang)
Lzu Tao889a4922018-12-28 10:07:05 +0700182 env: ALLOW_FAILURES=true
Lzu Taob3be8992018-12-14 01:38:06 +0700183 dist: xenial
184 language: cpp
185 compiler: clang
Lzu Tao889a4922018-12-28 10:07:05 +0700186 install:
Lzu Taob3be8992018-12-14 01:38:06 +0700187 - sudo apt-get install -qq liblz4-dev valgrind tree
Lzu Tao889a4922018-12-28 10:07:05 +0700188 - 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 Taob3be8992018-12-14 01:38:06 +0700193 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 Tao889a4922018-12-28 10:07:05 +0700204 - env: ALLOW_FAILURES=true