Sean Purcell | daec40d | 2017-03-07 12:08:15 -0800 | [diff] [blame] | 1 | # Medium Tests: Run on all commits/PRs to dev branch |
| 2 | |
Yann Collet | 4856a00 | 2015-01-24 01:58:16 +0100 | [diff] [blame] | 3 | language: c |
Przemyslaw Skibinski | 2e8ae51 | 2017-02-22 09:21:04 +0100 | [diff] [blame] | 4 | dist: trusty |
W. Felix Handte | e26be5a | 2018-05-14 11:55:21 -0400 | [diff] [blame] | 5 | sudo: required |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame^] | 6 | |
W. Felix Handte | e26be5a | 2018-05-14 11:55:21 -0400 | [diff] [blame] | 7 | addons: |
| 8 | apt: |
| 9 | update: true |
| 10 | |
Yann Collet | 4856a00 | 2015-01-24 01:58:16 +0100 | [diff] [blame] | 11 | matrix: |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame^] | 12 | fast_finish: true |
Yann Collet | 068a8c1 | 2016-06-05 00:23:20 +0200 | [diff] [blame] | 13 | include: |
Przemyslaw Skibinski | ca1d3d4 | 2017-02-28 08:16:49 +0100 | [diff] [blame] | 14 | # Ubuntu 14.04 |
cyan4973 | b8a81a9 | 2018-07-17 19:02:17 +0200 | [diff] [blame] | 15 | - env: Cmd='make test' |
Yann Collet | ca785c4 | 2018-08-03 07:59:33 -0700 | [diff] [blame] | 16 | |
Yann Collet | 93750a5 | 2018-08-08 10:22:19 -0700 | [diff] [blame] | 17 | - 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 Collet | d1afd48 | 2018-08-08 12:37:08 -0700 | [diff] [blame] | 22 | - env: Cmd='make gcc8install && CC=gcc-8 CFLAGS="-Werror -O3" make -j all' |
Sean Purcell | daec40d | 2017-03-07 12:08:15 -0800 | [diff] [blame] | 23 | - env: Cmd='make clang38install && CC=clang-3.8 make clean msan-test-zstd' |
Przemyslaw Skibinski | b68ea5d | 2017-02-24 08:18:44 +0100 | [diff] [blame] | 24 | |
Yann Collet | 1ae3877 | 2018-10-23 17:40:15 -0700 | [diff] [blame] | 25 | - env: Cmd='make cmakebuild' |
| 26 | |
Yann Collet | 31224cc | 2018-08-15 17:44:27 -0700 | [diff] [blame] | 27 | - env: Cmd='make staticAnalyze' |
| 28 | |
Sean Purcell | daec40d | 2017-03-07 12:08:15 -0800 | [diff] [blame] | 29 | - env: Cmd='make gcc6install && CC=gcc-6 make clean uasan-fuzztest' |
Yann Collet | ab1ebd6 | 2018-06-27 19:29:18 -0700 | [diff] [blame] | 30 | - env: Cmd='make gcc6install libc6install |
Yann Collet | ed1a429 | 2018-06-27 16:57:28 -0700 | [diff] [blame] | 31 | && make clean && CC=gcc-6 CFLAGS=-m32 make uasan-fuzztest' |
Sean Purcell | daec40d | 2017-03-07 12:08:15 -0800 | [diff] [blame] | 32 | - env: Cmd='make clang38install && CC=clang-3.8 make clean msan-fuzztest' |
Nick Terrell | a40b695 | 2018-11-08 10:59:01 -0800 | [diff] [blame] | 33 | - env: Cmd='make clang38install && CC=clang-3.8 make clean tsan-fuzztest' |
Przemyslaw Skibinski | b68ea5d | 2017-02-24 08:18:44 +0100 | [diff] [blame] | 34 | |
Yann Collet | ab1ebd6 | 2018-06-27 19:29:18 -0700 | [diff] [blame] | 35 | - env: Cmd='make -j uasanregressiontest |
Yann Collet | ed1a429 | 2018-06-27 16:57:28 -0700 | [diff] [blame] | 36 | && make clean && make -j msanregressiontest' |
| 37 | |
Yann Collet | ab1ebd6 | 2018-06-27 19:29:18 -0700 | [diff] [blame] | 38 | - env: Cmd='make valgrindinstall && make -C tests clean valgrindTest |
Yann Collet | ed1a429 | 2018-06-27 16:57:28 -0700 | [diff] [blame] | 39 | && make clean && make -C tests test-fuzzer-stackmode' |
| 40 | |
Yann Collet | 31224cc | 2018-08-15 17:44:27 -0700 | [diff] [blame] | 41 | - 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 Collet | ab1ebd6 | 2018-06-27 19:29:18 -0700 | [diff] [blame] | 46 | - env: Cmd='make lz4install && make -C tests test-lz4 |
| 47 | && make clean && make -C tests test-pool |
Yann Collet | ed1a429 | 2018-06-27 16:57:28 -0700 | [diff] [blame] | 48 | && make clean && bash tests/libzstd_partial_builds.sh' |
Yann Collet | 7fee966 | 2018-06-14 10:22:24 -0400 | [diff] [blame] | 49 | |
Yann Collet | 815edde | 2018-01-14 17:06:21 -0800 | [diff] [blame] | 50 | # tag-specific test |
| 51 | - if: tag =~ ^v[0-9]\.[0-9] |
| 52 | env: Cmd='make -C tests checkTag && tests/checkTag $TRAVIS_BRANCH' |
| 53 | |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame^] | 54 | - env: INSTALL_SYSTEM='meson' |
| 55 | allow_failures: |
| 56 | - env: INSTALL_SYSTEM='meson' |
| 57 | |
Sean Purcell | daec40d | 2017-03-07 12:08:15 -0800 | [diff] [blame] | 58 | git: |
| 59 | depth: 1 |
| 60 | |
| 61 | branches: |
| 62 | only: |
| 63 | - dev |
| 64 | - master |
Yann Collet | ed1a429 | 2018-06-27 16:57:28 -0700 | [diff] [blame] | 65 | - travisTest |
Przemyslaw Skibinski | 0b48a59 | 2016-11-14 13:07:45 +0100 | [diff] [blame] | 66 | |
Yann Collet | 068a8c1 | 2016-06-05 00:23:20 +0200 | [diff] [blame] | 67 | script: |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame^] | 68 | - 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 |