blob: 8cb40b1e14d1b9a22467865ef65d8b1d3a812cba [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
W. Felix Handtee26be5a2018-05-14 11:55:21 -04007addons:
8 apt:
9 update: true
10
Yann Collet4856a002015-01-24 01:58:16 +010011matrix:
Lzu Tao0a25b132018-11-28 13:06:18 +070012 fast_finish: true
Yann Collet068a8c12016-06-05 00:23:20 +020013 include:
Przemyslaw Skibinskica1d3d42017-02-28 08:16:49 +010014 # Ubuntu 14.04
cyan4973b8a81a92018-07-17 19:02:17 +020015 - env: Cmd='make test'
Yann Colletca785c42018-08-03 07:59:33 -070016
Yann Collet93750a52018-08-08 10:22:19 -070017 - env: Cmd='make gcc6install && CC=gcc-6 CFLAGS=-Werror make -j all
18 && make clean && CC=gcc-6 make -j uasan-test-zstd </dev/null' # test when stdin is not a tty
19 - env: Cmd='make gcc6install libc6install
20 && make clean && CC=gcc-6 make -j uasan-test-zstd32'
21 - env: Cmd='make gcc7install && make clean && CC=gcc-7 make -j uasan-test-zstd'
Yann Colletd1afd482018-08-08 12:37:08 -070022 - env: Cmd='make gcc8install && CC=gcc-8 CFLAGS="-Werror -O3" make -j all'
Sean Purcelldaec40d2017-03-07 12:08:15 -080023 - env: Cmd='make clang38install && CC=clang-3.8 make clean msan-test-zstd'
Przemyslaw Skibinskib68ea5d2017-02-24 08:18:44 +010024
Yann Collet1ae38772018-10-23 17:40:15 -070025 - env: Cmd='make cmakebuild'
26
Yann Collet31224cc2018-08-15 17:44:27 -070027 - env: Cmd='make staticAnalyze'
28
Sean Purcelldaec40d2017-03-07 12:08:15 -080029 - env: Cmd='make gcc6install && CC=gcc-6 make clean uasan-fuzztest'
Yann Colletab1ebd62018-06-27 19:29:18 -070030 - env: Cmd='make gcc6install libc6install
Yann Colleted1a4292018-06-27 16:57:28 -070031 && make clean && CC=gcc-6 CFLAGS=-m32 make uasan-fuzztest'
Sean Purcelldaec40d2017-03-07 12:08:15 -080032 - env: Cmd='make clang38install && CC=clang-3.8 make clean msan-fuzztest'
Nick Terrella40b6952018-11-08 10:59:01 -080033 - env: Cmd='make clang38install && CC=clang-3.8 make clean tsan-fuzztest'
Przemyslaw Skibinskib68ea5d2017-02-24 08:18:44 +010034
Yann Colletab1ebd62018-06-27 19:29:18 -070035 - env: Cmd='make -j uasanregressiontest
Yann Colleted1a4292018-06-27 16:57:28 -070036 && make clean && make -j msanregressiontest'
37
Yann Colletab1ebd62018-06-27 19:29:18 -070038 - env: Cmd='make valgrindinstall && make -C tests clean valgrindTest
Yann Colleted1a4292018-06-27 16:57:28 -070039 && make clean && make -C tests test-fuzzer-stackmode'
40
Yann Collet31224cc2018-08-15 17:44:27 -070041 - env: Cmd='make arminstall && make armfuzz'
42 - env: Cmd='make arminstall && make aarch64fuzz'
43 - env: Cmd='make ppcinstall && make ppcfuzz'
44 - env: Cmd='make ppcinstall && make ppc64fuzz'
45
Yann Colletab1ebd62018-06-27 19:29:18 -070046 - env: Cmd='make lz4install && make -C tests test-lz4
47 && make clean && make -C tests test-pool
Yann Colleted1a4292018-06-27 16:57:28 -070048 && make clean && bash tests/libzstd_partial_builds.sh'
Yann Collet7fee9662018-06-14 10:22:24 -040049
Yann Collet815edde2018-01-14 17:06:21 -080050 # tag-specific test
51 - if: tag =~ ^v[0-9]\.[0-9]
52 env: Cmd='make -C tests checkTag && tests/checkTag $TRAVIS_BRANCH'
53
Lzu Taoff1bca32018-11-30 21:10:06 +070054 - dist: xenial
55 env: BUILD_SYSTEM='meson'
Lzu Tao0a25b132018-11-28 13:06:18 +070056 allow_failures:
Lzu Tao8c59d942018-11-29 17:48:18 +070057 - env: BUILD_SYSTEM='meson'
Lzu Tao0a25b132018-11-28 13:06:18 +070058
Sean Purcelldaec40d2017-03-07 12:08:15 -080059git:
60 depth: 1
61
62branches:
63 only:
64 - dev
65 - master
Yann Colleted1a4292018-06-27 16:57:28 -070066 - travisTest
Przemyslaw Skibinski0b48a592016-11-14 13:07:45 +010067
Yann Collet068a8c12016-06-05 00:23:20 +020068script:
Lzu Tao0a25b132018-11-28 13:06:18 +070069 - JOB_NUMBER=$(printf '%s' "${TRAVIS_JOB_NUMBER}" | sed -E 's@[0-9]+\.([0-9]+)@\1@')
70 - printf 'JOB_NUMBER=%s TRAVIS_BRANCH=%s TRAVIS_EVENT_TYPE=%s TRAVIS_PULL_REQUEST=%s\n'
71 "${JOB_NUMBER}" "${TRAVIS_BRANCH}" "${TRAVIS_EVENT_TYPE}" "${TRAVIS_PULL_REQUEST}"
Lzu Tao8c59d942018-11-29 17:48:18 +070072 - if [ "${BUILD_SYSTEM}" = meson ]; then
Lzu Taoff1bca32018-11-30 21:10:06 +070073 set -x;
74 sudo apt-get install -qq liblz4-dev valgrind tree
Lzu Tao25311d22018-12-03 00:57:10 +070075 && curl -o ~/get-pip.py 'https://bootstrap.pypa.io/get-pip.py'
76 && python3 ~/get-pip.py --user
Lzu Taoff1bca32018-11-30 21:10:06 +070077 && pip3 install --user meson ninja
Lzu Tao25311d22018-12-03 00:57:10 +070078 && export CC=clang CXX=clang++
Lzu Taoff1bca32018-11-30 21:10:06 +070079 && meson --buildtype=debug
Lzu Tao25311d22018-12-03 00:57:10 +070080 -Db_lundef=false
81 -Dauto_features=enabled
82 -Dbuild_{programs,tests,contrib}=true
83 -Ddefault_library=both
84 build/meson builddir
Lzu Taoff1bca32018-11-30 21:10:06 +070085 && cd "$_"
Lzu Tao0a25b132018-11-28 13:06:18 +070086 && DESTDIR=./staging ninja install
87 && tree ./staging;
Lzu Taoff1bca32018-11-30 21:10:06 +070088 travis_terminate "$?";
Lzu Tao0a25b132018-11-28 13:06:18 +070089 fi
Lzu Taoff1bca32018-11-30 21:10:06 +070090 - export FUZZERTEST=-T2mn;
91 export ZSTREAM_TESTTIME=-T2mn;
92 export DECODECORPUS_TESTTIME=-T1mn;
93 sh -c "${Cmd}" || travis_terminate 1;