blob: b3a654378d87df7680546ce1ccf0fe15c1ab67b2 [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
Lzu Tao0a25b132018-11-28 13:06:18 +07005
Sean Purcelldaec40d2017-03-07 12:08:15 -08006git:
7 depth: 1
8
9branches:
10 only:
11 - dev
12 - master
Yann Colleted1a4292018-06-27 16:57:28 -070013 - travisTest
Przemyslaw Skibinski0b48a592016-11-14 13:07:45 +010014
Lzu Taob3be8992018-12-14 01:38:06 +070015addons:
16 apt:
17 update: true
18
19env:
20 global:
21 - FUZZERTEST=-T2mn
22 ZSTREAM_TESTTIME=-T2mn
23 DECODECORPUS_TESTTIME=-T1mn
24
Lzu Taob3be8992018-12-14 01:38:06 +070025
26matrix:
27 fast_finish: true
28 include:
29 - name: Trusty (Test All)
30 script:
31 - make test
32
Yann Collet7d51e1a2018-12-24 04:15:41 -080033 - name: gcc-6 + gcc-7 compilation
Lzu Taob3be8992018-12-14 01:38:06 +070034 script:
Yann Collet7d51e1a2018-12-24 04:15:41 -080035 - make gcc6install gcc7install
Lzu Taob3be8992018-12-14 01:38:06 +070036 - CC=gcc-6 CFLAGS=-Werror make -j all
37 - make clean
Yann Collet7d51e1a2018-12-24 04:15:41 -080038 - CC=gcc-7 CFLAGS=-Werror make -j all
Yann Collet515c2aa2018-12-24 02:56:21 -080039
Yann Collet7d51e1a2018-12-24 04:15:41 -080040 - name: gcc-8 + ASan + UBSan + Test Zstd
Lzu Taob3be8992018-12-14 01:38:06 +070041 script:
42 - make gcc8install
Yann Collet7d51e1a2018-12-24 04:15:41 -080043 - 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 Collet515c2aa2018-12-24 02:56:21 -080053
Lzu Taob3be8992018-12-14 01:38:06 +070054 - 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 Handte4e2f6c12018-12-05 14:04:57 -080059 - name: Trusty (Minimal Decompressor Macros)
60 script:
61 - make clean
Yann Collet515c2aa2018-12-24 02:56:21 -080062 - CFLAGS=-Werror make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
W. Felix Handte4e2f6c12018-12-05 14:04:57 -080063 - make clean
Yann Collet515c2aa2018-12-24 02:56:21 -080064 - make -j check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
W. Felix Handte4e2f6c12018-12-05 14:04:57 -080065 - make clean
Yann Collet515c2aa2018-12-24 02:56:21 -080066 - 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 Handte4e2f6c12018-12-05 14:04:57 -080073
Lzu Taob3be8992018-12-14 01:38:06 +070074 - name: Trusty (CMake)
75 script:
76 - make cmakebuild
77
78 - name: Trusty (Static Analyze)
79 script:
80 - make staticAnalyze
81
Yann Collet7d51e1a2018-12-24 04:15:41 -080082 - name: Trusty (gcc-8 + ASan + UBSan + Fuzz Test)
Lzu Taob3be8992018-12-14 01:38:06 +070083 script:
Yann Collet7d51e1a2018-12-24 04:15:41 -080084 - make gcc8install
85 - CC=gcc-8 make clean uasan-fuzztest
Yann Collet515c2aa2018-12-24 02:56:21 -080086
Lzu Taob3be8992018-12-14 01:38:06 +070087 - name: Trusty (gcc-6 + ASan + UBSan + Fuzz Test 32bit)
88 script:
89 - make gcc6install libc6install
Yann Collet7d51e1a2018-12-24 04:15:41 -080090 - CC=gcc-6 CFLAGS="-O2 -m32" make uasan-fuzztest # can complain about pointer overflow
Yann Collet515c2aa2018-12-24 02:56:21 -080091
Lzu Taob3be8992018-12-14 01:38:06 +070092 - name: Trusty (clang-3.8 + MSan + Fuzz Test)
93 script:
94 - make clang38install
95 - CC=clang-3.8 make clean msan-fuzztest
Yann Collet515c2aa2018-12-24 02:56:21 -080096
Lzu Taob3be8992018-12-14 01:38:06 +070097 - 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 Colletc8d1fda2018-12-21 15:08:48 -0800114
115 - name: Xenial (AARCH64 + Fuzz Test)
116 dist: xenial
Lzu Taob3be8992018-12-14 01:38:06 +0700117 script:
118 - make arminstall
119 - make aarch64fuzz
Yann Colletc8d1fda2018-12-21 15:08:48 -0800120
Lzu Taob3be8992018-12-14 01:38:06 +0700121 - name: Trusty (PPC + Fuzz Test)
122 script:
123 - make ppcinstall
124 - make ppcfuzz
Yann Colletc8d1fda2018-12-21 15:08:48 -0800125
Yann Collet81dab452018-12-24 03:31:40 -0800126 # check release number
Lzu Taob3be8992018-12-14 01:38:06 +0700127 - 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 Collet81dab452018-12-24 03:31:40 -0800133 # tests for master branch and cron job only
134 - name: OS-X
Yann Collet66b21b62018-12-24 03:44:57 -0800135 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800136 os: osx
137 script:
138 - make test
139
140 - name: thread sanitizer
Yann Collet66b21b62018-12-24 03:44:57 -0800141 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800142 script:
143 - make clang38install
144 - CC=clang-3.8 make tsan-test-zstream
Yann Collet7d51e1a2018-12-24 04:15:41 -0800145 - CC=clang-3.8 make tsan-fuzztest
Yann Collet81dab452018-12-24 03:31:40 -0800146
Yann Collet66b21b62018-12-24 03:44:57 -0800147 - name: C++ and gnu90 compatibility
148 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800149 script:
150 - make cxxtest
151 - make clean
152 - make gnu90build
153 - make clean
Yann Collet66b21b62018-12-24 03:44:57 -0800154 - make travis-install # just ensures `make install` works
Yann Collet81dab452018-12-24 03:31:40 -0800155
Yann Collet7d51e1a2018-12-24 04:15:41 -0800156 - name: PPC64
157 if: branch = master
158 script:
159 - make ppcinstall
160 - make ppc64fuzz
161
Yann Collet81dab452018-12-24 03:31:40 -0800162 - name: zlib wrapper test
Yann Collet66b21b62018-12-24 03:44:57 -0800163 if: branch = master
Yann Collet81dab452018-12-24 03:31:40 -0800164 script:
165 - make gpp6install valgrindinstall
166 - make -C zlibWrapper test
167 - make -C zlibWrapper valgrindTest
168
Yann Collet7d51e1a2018-12-24 04:15:41 -0800169 - 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 Collet81dab452018-12-24 03:31:40 -0800179 # meson dedicated test
Lzu Taob3be8992018-12-14 01:38:06 +0700180 - name: Xenial (Meson + clang)
Lzu Tao889a4922018-12-28 10:07:05 +0700181 env: ALLOW_FAILURES=true
Lzu Taob3be8992018-12-14 01:38:06 +0700182 dist: xenial
183 language: cpp
184 compiler: clang
Lzu Tao889a4922018-12-28 10:07:05 +0700185 install:
Lzu Taob3be8992018-12-14 01:38:06 +0700186 - sudo apt-get install -qq liblz4-dev valgrind tree
Lzu Tao889a4922018-12-28 10:07:05 +0700187 - 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 Taob3be8992018-12-14 01:38:06 +0700192 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 Tao889a4922018-12-28 10:07:05 +0700203 - env: ALLOW_FAILURES=true