2017-03-07 20:08:15 +00:00
|
|
|
# Medium Tests: Run on all commits/PRs to dev branch
|
|
|
|
|
2015-01-24 00:58:16 +00:00
|
|
|
language: c
|
2018-11-28 06:06:18 +00:00
|
|
|
|
2017-03-07 20:08:15 +00:00
|
|
|
git:
|
|
|
|
depth: 1
|
2017-01-02 23:25:01 +00:00
|
|
|
|
2017-03-07 20:08:15 +00:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- dev
|
|
|
|
- master
|
2018-06-27 23:57:28 +00:00
|
|
|
- travisTest
|
2016-01-11 15:39:42 +00:00
|
|
|
|
2018-12-13 18:38:06 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
update: true
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- FUZZERTEST=-T2mn
|
|
|
|
ZSTREAM_TESTTIME=-T2mn
|
|
|
|
DECODECORPUS_TESTTIME=-T1mn
|
|
|
|
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: arm64 # ~2.5 mn
|
2019-10-23 17:43:20 +00:00
|
|
|
os: linux
|
|
|
|
arch: arm64
|
|
|
|
script:
|
|
|
|
- make check
|
|
|
|
|
2020-01-06 22:19:11 +00:00
|
|
|
- name: make benchmarking
|
|
|
|
script:
|
|
|
|
- make benchmarking
|
|
|
|
|
|
|
|
- name: make test (complete)
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
2019-11-25 18:35:36 +00:00
|
|
|
# DEVNULLRIGHTS : will request sudo rights to test permissions on /dev/null
|
|
|
|
- DEVNULLRIGHTS=test make test
|
2018-12-13 18:38:06 +00:00
|
|
|
|
2020-04-29 01:29:20 +00:00
|
|
|
- name: gcc-6 + gcc-7 + libzstdmt compilation # ~ 6mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
2018-12-24 12:15:41 +00:00
|
|
|
- make gcc6install gcc7install
|
2018-12-13 18:38:06 +00:00
|
|
|
- CC=gcc-6 CFLAGS=-Werror make -j all
|
|
|
|
- make clean
|
2018-12-24 12:15:41 +00:00
|
|
|
- CC=gcc-7 CFLAGS=-Werror make -j all
|
2020-04-29 01:29:20 +00:00
|
|
|
- make clean
|
|
|
|
- LDFLAGS=-Wl,--no-undefined make -C lib libzstd-mt
|
2020-04-29 04:18:29 +00:00
|
|
|
- make -C tests zbufftest-dll
|
|
|
|
# LDFLAGS=-Wl,--no-undefined : will make the linker fail if dll is underlinked
|
|
|
|
# zbufftest-dll : test that a user program can link to multi-threaded libzstd without specifying -pthread
|
2018-12-24 10:56:21 +00:00
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: gcc-8 + ASan + UBSan + Test Zstd # ~6.5mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
2018-12-24 12:15:41 +00:00
|
|
|
- make gcc8install
|
|
|
|
- CC=gcc-8 CFLAGS="-Werror" make -j all
|
2018-12-13 18:38:06 +00:00
|
|
|
- make clean
|
2018-12-24 12:15:41 +00:00
|
|
|
- CC=gcc-8 make -j uasan-test-zstd </dev/null # test when stdin is not a tty
|
2018-12-24 10:56:21 +00:00
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: gcc-6 + ASan + UBSan + Test Zstd, 32bit mode # ~4mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
2018-12-24 12:15:41 +00:00
|
|
|
- make gcc6install libc6install
|
|
|
|
- CC=gcc-6 CFLAGS="-Werror -m32" make -j all32
|
2018-12-13 18:38:06 +00:00
|
|
|
- make clean
|
2018-12-24 12:15:41 +00:00
|
|
|
- CC=gcc-6 make -j uasan-test-zstd32 # note : can complain about pointer overflow
|
2018-12-24 10:56:21 +00:00
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: clang-3.8 + MSan + Test Zstd # ~3.5mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
|
|
|
- make clang38install
|
2019-10-21 19:55:39 +00:00
|
|
|
# External libraries must be turned off when using MSAN tests,
|
|
|
|
# because they are not msan-instrumented,
|
|
|
|
# so any data coming from these libraries is always considered "uninitialized"
|
|
|
|
- CC=clang-3.8 make clean msan-test-zstd HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=0
|
2018-12-13 18:38:06 +00:00
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: Minimal Decompressor Macros # ~5mn
|
2018-12-05 22:04:57 +00:00
|
|
|
script:
|
2020-10-15 19:00:26 +00:00
|
|
|
- make clean && make -j all ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror"
|
2020-10-20 23:32:22 +00:00
|
|
|
- make clean && make check ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror"
|
2020-10-15 19:00:26 +00:00
|
|
|
- make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
|
2020-10-20 23:32:22 +00:00
|
|
|
- make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
|
2020-10-15 19:00:26 +00:00
|
|
|
- make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG"
|
2020-10-20 23:32:22 +00:00
|
|
|
- make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG"
|
2020-10-15 19:00:26 +00:00
|
|
|
- make clean && make -j all MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS"
|
2020-10-20 23:32:22 +00:00
|
|
|
- make clean && make check MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS"
|
2018-12-05 22:04:57 +00:00
|
|
|
|
2020-03-23 20:08:52 +00:00
|
|
|
- name: cmake build and test check # ~6mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
|
|
|
- make cmakebuild
|
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: static analyzer scanbuild # ~26mn
|
2019-11-27 22:39:43 +00:00
|
|
|
dist: trusty # note : it's important to pin down a version of static analyzer, since different versions report different false positives
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
|
|
|
- make staticAnalyze
|
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: gcc-8 + ASan + UBSan + Fuzz Test # ~19mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
2018-12-24 12:15:41 +00:00
|
|
|
- make gcc8install
|
|
|
|
- CC=gcc-8 make clean uasan-fuzztest
|
2018-12-24 10:56:21 +00:00
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: gcc-6 + ASan + UBSan + Fuzz Test 32bit # ~15.5mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
|
|
|
- make gcc6install libc6install
|
2018-12-24 12:15:41 +00:00
|
|
|
- CC=gcc-6 CFLAGS="-O2 -m32" make uasan-fuzztest # can complain about pointer overflow
|
2018-12-24 10:56:21 +00:00
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: clang-3.8 + MSan + Fuzz Test # ~14.5mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
|
|
|
- make clang38install
|
|
|
|
- CC=clang-3.8 make clean msan-fuzztest
|
2018-12-24 10:56:21 +00:00
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: ASan + UBSan + MSan + Regression Test # ~ 4.5mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
|
|
|
- make -j uasanregressiontest
|
|
|
|
- make clean
|
|
|
|
- make -j msanregressiontest
|
|
|
|
|
2019-11-26 18:30:11 +00:00
|
|
|
- name: C++, gnu90 and c99 compatibility # ~3mn
|
|
|
|
script:
|
|
|
|
- make cxxtest
|
|
|
|
- make clean
|
|
|
|
- make gnu90build
|
|
|
|
- make clean
|
|
|
|
- make c99build
|
|
|
|
- make clean
|
|
|
|
- make travis-install # just ensures `make install` works
|
|
|
|
|
2019-11-27 20:44:02 +00:00
|
|
|
- name: mingw cross-compilation
|
|
|
|
script :
|
|
|
|
- sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix;
|
2019-11-27 22:39:43 +00:00
|
|
|
- CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CFLAGS="-Werror -O1" make zstd
|
2019-11-27 20:44:02 +00:00
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: Valgrind + Fuzz Test Stack Mode # ~ 7mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
|
|
|
- make valgrindinstall
|
|
|
|
- make -C tests clean valgrindTest
|
|
|
|
- make clean
|
|
|
|
- make -C tests test-fuzzer-stackmode
|
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: Qemu ARM emulation + Fuzz Test # ~13.5mn
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
|
|
|
- make arminstall
|
|
|
|
- make armfuzz
|
2018-12-21 23:08:48 +00:00
|
|
|
|
2019-12-05 22:14:57 +00:00
|
|
|
# Introduced to check compat with old toolchains, to prevent e.g. #1872
|
|
|
|
- name: ARM Build Test (on Trusty)
|
|
|
|
dist: trusty
|
|
|
|
script:
|
|
|
|
- make arminstall
|
|
|
|
- make armbuild
|
|
|
|
|
2019-11-27 00:44:56 +00:00
|
|
|
- name: Qemu PPC + Fuzz Test # ~13mn
|
|
|
|
dist: trusty # it seems ppc cross-compilation fails on "current"
|
2018-12-13 18:38:06 +00:00
|
|
|
script:
|
|
|
|
- make ppcinstall
|
|
|
|
- make ppcfuzz
|
2018-12-21 23:08:48 +00:00
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
# check release number (release only)
|
2018-12-13 18:38:06 +00:00
|
|
|
- name: Tag-Specific Test
|
|
|
|
if: tag =~ ^v[0-9]\.[0-9]
|
|
|
|
script:
|
|
|
|
- make -C tests checkTag
|
|
|
|
- tests/checkTag "$TRAVIS_BRANCH"
|
|
|
|
|
2018-12-24 11:31:40 +00:00
|
|
|
# tests for master branch and cron job only
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: OS-X # ~13mn
|
2019-12-14 21:29:24 +00:00
|
|
|
if: branch = master
|
2018-12-24 11:31:40 +00:00
|
|
|
os: osx
|
|
|
|
script:
|
|
|
|
- make test
|
2020-05-08 17:10:20 +00:00
|
|
|
- make -C lib all
|
2018-12-24 11:31:40 +00:00
|
|
|
|
2020-02-06 00:55:00 +00:00
|
|
|
- name: zbuff test
|
|
|
|
if: branch = master
|
|
|
|
script:
|
2020-05-21 07:22:52 +00:00
|
|
|
- make -C tests test-zbuff
|
2020-02-06 00:55:00 +00:00
|
|
|
|
2019-11-26 18:28:21 +00:00
|
|
|
- name: Versions Compatibility Test # 11.5mn
|
|
|
|
if: branch = master
|
|
|
|
script:
|
|
|
|
- make -C tests versionsTest
|
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: thread sanitizer # ~29mn
|
2018-12-24 11:44:57 +00:00
|
|
|
if: branch = master
|
2018-12-24 11:31:40 +00:00
|
|
|
script:
|
|
|
|
- make clang38install
|
|
|
|
- CC=clang-3.8 make tsan-test-zstream
|
2018-12-24 12:15:41 +00:00
|
|
|
- CC=clang-3.8 make tsan-fuzztest
|
2018-12-24 11:31:40 +00:00
|
|
|
|
2019-12-14 21:29:24 +00:00
|
|
|
- name: PPC64LE + Fuzz test # ~13mn
|
|
|
|
if: branch = master
|
|
|
|
arch: ppc64le
|
|
|
|
script:
|
|
|
|
- cat /proc/cpuinfo
|
|
|
|
- make test
|
|
|
|
|
2020-05-21 17:26:40 +00:00
|
|
|
- name: Qemu PPC64 + Fuzz test # ~13mn, presumed Big-Endian (?)
|
|
|
|
dist: trusty # note : PPC64 cross-compilation for Qemu tests seems broken on Xenial
|
|
|
|
if: branch = master
|
|
|
|
script:
|
|
|
|
- make ppcinstall
|
|
|
|
- make ppc64fuzz
|
|
|
|
|
2019-11-27 20:44:02 +00:00
|
|
|
# note : we already have aarch64 tests on hardware
|
|
|
|
- name: Qemu aarch64 + Fuzz Test (on Xenial) # ~14mn
|
|
|
|
if: branch = master
|
|
|
|
dist: xenial
|
|
|
|
script:
|
|
|
|
- make arminstall
|
|
|
|
- make aarch64fuzz
|
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: zlib wrapper test # ~7.5mn
|
2018-12-24 11:44:57 +00:00
|
|
|
if: branch = master
|
2018-12-24 11:31:40 +00:00
|
|
|
script:
|
|
|
|
- make gpp6install valgrindinstall
|
|
|
|
- make -C zlibWrapper test
|
|
|
|
- make -C zlibWrapper valgrindTest
|
|
|
|
|
2019-11-26 18:24:09 +00:00
|
|
|
- name: LZ4, thread pool, and partial libs tests # ~2mn
|
2018-12-24 12:15:41 +00:00
|
|
|
if: branch = master
|
|
|
|
script:
|
|
|
|
- make lz4install
|
|
|
|
- make -C tests test-lz4
|
|
|
|
- make clean
|
|
|
|
- make -C tests test-pool
|
|
|
|
- make clean
|
|
|
|
- bash tests/libzstd_partial_builds.sh
|
|
|
|
|
2018-12-24 11:31:40 +00:00
|
|
|
# meson dedicated test
|
2020-05-21 21:19:28 +00:00
|
|
|
- name: Xenial (Meson + clang) # ~15mn
|
2019-11-26 18:24:09 +00:00
|
|
|
if: branch = master
|
2018-12-13 18:38:06 +00:00
|
|
|
dist: xenial
|
|
|
|
language: cpp
|
|
|
|
compiler: clang
|
2018-12-28 03:07:05 +00:00
|
|
|
install:
|
2018-12-13 18:38:06 +00:00
|
|
|
- sudo apt-get install -qq liblz4-dev valgrind tree
|
2019-06-28 18:42:17 +00:00
|
|
|
- |
|
|
|
|
travis_retry curl -o ~/ninja.zip -L 'https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip' &&
|
|
|
|
unzip ~/ninja.zip -d ~/.local/bin
|
|
|
|
- |
|
|
|
|
travis_retry curl -o ~/get-pip.py -L 'https://bootstrap.pypa.io/get-pip.py' &&
|
|
|
|
python3 ~/get-pip.py --user &&
|
|
|
|
pip3 install --user meson
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
meson setup \
|
|
|
|
--buildtype=debugoptimized \
|
|
|
|
-Db_lundef=false \
|
|
|
|
-Dauto_features=enabled \
|
2019-06-28 18:59:57 +00:00
|
|
|
-Dbin_programs=true \
|
|
|
|
-Dbin_tests=true \
|
|
|
|
-Dbin_contrib=true \
|
2019-06-28 18:42:17 +00:00
|
|
|
-Ddefault_library=both \
|
2019-05-02 19:35:37 +00:00
|
|
|
build/meson builddir
|
2019-04-30 06:12:00 +00:00
|
|
|
- pushd builddir
|
2019-05-02 19:35:37 +00:00
|
|
|
- ninja
|
|
|
|
- meson test --verbose --no-rebuild
|
2018-12-13 18:38:06 +00:00
|
|
|
- DESTDIR=./staging ninja install
|
|
|
|
- tree ./staging
|
2019-05-02 19:35:37 +00:00
|
|
|
after_failure:
|
|
|
|
- cat "$TRAVIS_BUILD_DIR"/builddir/meson-logs/testlog.txt
|
2019-10-23 00:43:29 +00:00
|
|
|
|
2018-12-13 18:38:06 +00:00
|
|
|
allow_failures:
|
2018-12-28 03:07:05 +00:00
|
|
|
- env: ALLOW_FAILURES=true
|