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 | ff1bca3 | 2018-11-30 21:10:06 +0700 | [diff] [blame] | 54 | - dist: xenial |
| 55 | env: BUILD_SYSTEM='meson' |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame] | 56 | allow_failures: |
Lzu Tao | 8c59d94 | 2018-11-29 17:48:18 +0700 | [diff] [blame] | 57 | - env: BUILD_SYSTEM='meson' |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame] | 58 | |
Sean Purcell | daec40d | 2017-03-07 12:08:15 -0800 | [diff] [blame] | 59 | git: |
| 60 | depth: 1 |
| 61 | |
| 62 | branches: |
| 63 | only: |
| 64 | - dev |
| 65 | - master |
Yann Collet | ed1a429 | 2018-06-27 16:57:28 -0700 | [diff] [blame] | 66 | - travisTest |
Przemyslaw Skibinski | 0b48a59 | 2016-11-14 13:07:45 +0100 | [diff] [blame] | 67 | |
Yann Collet | 068a8c1 | 2016-06-05 00:23:20 +0200 | [diff] [blame] | 68 | script: |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame] | 69 | - 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 Tao | 8c59d94 | 2018-11-29 17:48:18 +0700 | [diff] [blame] | 72 | - if [ "${BUILD_SYSTEM}" = meson ]; then |
Lzu Tao | ff1bca3 | 2018-11-30 21:10:06 +0700 | [diff] [blame] | 73 | set -x; |
| 74 | sudo apt-get install -qq liblz4-dev valgrind tree |
Lzu Tao | 25311d2 | 2018-12-03 00:57:10 +0700 | [diff] [blame] | 75 | && curl -o ~/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' |
| 76 | && python3 ~/get-pip.py --user |
Lzu Tao | ff1bca3 | 2018-11-30 21:10:06 +0700 | [diff] [blame] | 77 | && pip3 install --user meson ninja |
Lzu Tao | 25311d2 | 2018-12-03 00:57:10 +0700 | [diff] [blame] | 78 | && export CC=clang CXX=clang++ |
Lzu Tao | ff1bca3 | 2018-11-30 21:10:06 +0700 | [diff] [blame] | 79 | && meson --buildtype=debug |
Lzu Tao | 25311d2 | 2018-12-03 00:57:10 +0700 | [diff] [blame] | 80 | -Db_lundef=false |
| 81 | -Dauto_features=enabled |
| 82 | -Dbuild_{programs,tests,contrib}=true |
| 83 | -Ddefault_library=both |
| 84 | build/meson builddir |
Lzu Tao | ff1bca3 | 2018-11-30 21:10:06 +0700 | [diff] [blame] | 85 | && cd "$_" |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame] | 86 | && DESTDIR=./staging ninja install |
| 87 | && tree ./staging; |
Lzu Tao | ff1bca3 | 2018-11-30 21:10:06 +0700 | [diff] [blame] | 88 | travis_terminate "$?"; |
Lzu Tao | 0a25b13 | 2018-11-28 13:06:18 +0700 | [diff] [blame] | 89 | fi |
Lzu Tao | ff1bca3 | 2018-11-30 21:10:06 +0700 | [diff] [blame] | 90 | - export FUZZERTEST=-T2mn; |
| 91 | export ZSTREAM_TESTTIME=-T2mn; |
| 92 | export DECODECORPUS_TESTTIME=-T1mn; |
| 93 | sh -c "${Cmd}" || travis_terminate 1; |