blob: 777e5ad86351767ff6411986f8846a0a1461b5d6 [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 Tao0a25b132018-11-28 13:06:18 +070054 - env: INSTALL_SYSTEM='meson'
55 allow_failures:
56 - env: INSTALL_SYSTEM='meson'
57
Sean Purcelldaec40d2017-03-07 12:08:15 -080058git:
59 depth: 1
60
61branches:
62 only:
63 - dev
64 - master
Yann Colleted1a4292018-06-27 16:57:28 -070065 - travisTest
Przemyslaw Skibinski0b48a592016-11-14 13:07:45 +010066
Yann Collet068a8c12016-06-05 00:23:20 +020067script:
Lzu Tao0a25b132018-11-28 13:06:18 +070068 - JOB_NUMBER=$(printf '%s' "${TRAVIS_JOB_NUMBER}" | sed -E 's@[0-9]+\.([0-9]+)@\1@')
69 - printf 'JOB_NUMBER=%s TRAVIS_BRANCH=%s TRAVIS_EVENT_TYPE=%s TRAVIS_PULL_REQUEST=%s\n'
70 "${JOB_NUMBER}" "${TRAVIS_BRANCH}" "${TRAVIS_EVENT_TYPE}" "${TRAVIS_PULL_REQUEST}"
71 - if [ "${INSTALL_SYSTEM}" = meson ]; then
72 sudo apt-get install -qq python3.5 wget tree
73 && wget https://bootstrap.pypa.io/get-pip.py
74 && python3.5 get-pip.py --user
75 && rm get-pip.py
76 && pip3.5 install --user meson ninja;
77 mkdir contrib/meson/build;
78 pushd "$_";
79 meson --buildtype=debug -Dbuild_contrib=true -Dbuild_tests=true ..
80 && ninja
81 && DESTDIR=./staging ninja install
82 && tree ./staging;
83 popd;
84 else
85 export FUZZERTEST=-T2mn;
86 export ZSTREAM_TESTTIME=-T2mn;
87 export DECODECORPUS_TESTTIME=-T1mn;
88 sh -c "${Cmd}" || travis_terminate 1;
89 fi