diff options
author | Lzu Tao <taolzu@gmail.com> | 2019-01-10 18:20:16 (GMT) |
---|---|---|
committer | Lzu Tao <taolzu@gmail.com> | 2019-01-10 21:17:34 (GMT) |
commit | 7fe378fc70476fdc385658cb08791942b1077934 (patch) | |
tree | cc2a2c913dfdc2a3836c76c6433a791d519b05cb | |
parent | ec735ac53e6b216efcbcd411d496dc90b058c570 (diff) | |
download | lz4-7fe378fc70476fdc385658cb08791942b1077934.zip lz4-7fe378fc70476fdc385658cb08791942b1077934.tar.gz lz4-7fe378fc70476fdc385658cb08791942b1077934.tar.bz2 |
travis: Prefer `script` field than `Cmd` env
-rw-r--r-- | .travis.yml | 186 |
1 files changed, 108 insertions, 78 deletions
diff --git a/.travis.yml b/.travis.yml index 66da011..9e968fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,90 +1,116 @@ language: c + matrix: fast_finish: true include: # OS X Mavericks - - os: osx + - name: (macOS) General Test + os: osx install: - export CC=clang - env: Ubu=OS_X_Mavericks Cmd='make -C tests test-lz4 MOREFLAGS="-Werror -Wconversion -Wno-sign-conversion" && CFLAGS=-m32 make -C tests clean test-lz4-contentSize' COMPILER=clang + script: + - make -C tests test-lz4 MOREFLAGS='-Werror -Wconversion -Wno-sign-conversion' + - CFLAGS=-m32 make -C tests clean test-lz4-contentSize # Container-based 12.04 LTS Server Edition 64 bit (doesn't support 32-bit includes) - - os: linux - sudo: false - env: Ubu=12.04cont Cmd='make -C tests test-lz4 test-lz4c test-fullbench' COMPILER=cc + - name: (Precise) benchmark test + dist: precise + script: + - make -C tests test-lz4 test-lz4c test-fullbench - - os: linux - sudo: required - env: Ubu=12.04cont Cmd='sudo sysctl -w vm.mmap_min_addr="4096" && make -C tests test-frametest test-fuzzer' COMPILER=cc + - name: (Precise) frame and fuzzer test + dist: precise + install: + - sudo sysctl -w vm.mmap_min_addr=4096 + script: + - make -C tests test-frametest test-fuzzer - - os: linux - sudo: false - env: Ubu=12.04cont Cmd="make gpptest && make clean && make examples && make clean cmake && make clean travis-install && make clean clangtest" COMPILER=cc + - name: (Precise) g++ and clang CMake test + dist: precise + script: + - make gpptest + - make clean + - make examples + - make clean cmake + - make clean travis-install + - make clean clangtest # 14.04 LTS Server Edition 64 bit - - env: Ubu=14.04 Cmd='make -C tests test MOREFLAGS=-mx32' COMPILER=cc + - name: (Trusty) i386 gcc test dist: trusty - sudo: required addons: apt: packages: - libc6-dev-i386 - gcc-multilib + script: + - make -C tests test MOREFLAGS=-mx32 # presume clang >= v3.9.0 - - env: Ubu=14.04 Cmd='make usan MOREFLAGS=-Wcomma -Werror' COMPILER=clang + - name: (Trusty) USan test dist: trusty - sudo: required addons: apt: packages: - clang + script: + - make usan MOREFLAGS=-Wcomma -Werror - - env: Ubu=14.04 Cmd='make c_standards && make -C tests test-lz4 test-mem' COMPILER=cc + - name: (Trusty) valgrind test dist: trusty - sudo: required addons: apt: packages: - valgrind + script: + - make c_standards + - make -C tests test-lz4 test-mem - - env: Ubu=14.04 Cmd='make ctocpptest' COMPILER=cc + - name: (Trusty) c-to-c++ test dist: trusty - sudo: false + script: + - make ctocpptest - - env: Ubu=14.04 Cmd='make -C tests test-lz4c32 test-fullbench32 versionsTest' COMPILER=cc + - name: (Trusty) i386 benchmark + version test dist: trusty - sudo: required addons: apt: packages: - python3 - libc6-dev-i386 - gcc-multilib + script: + - make -C tests test-lz4c32 test-fullbench32 versionsTest - - env: Ubu=14.04 Cmd='sudo sysctl -w vm.mmap_min_addr="4096" && make -C tests test-frametest32 test-fuzzer32' COMPILER=cc + - name: (Trusty) i386 frame + fuzzer test dist: trusty - sudo: required addons: apt: packages: - libc6-dev-i386 - gcc-multilib + install: + - sudo sysctl -w vm.mmap_min_addr="4096" + script: + - make -C tests test-frametest32 test-fuzzer32 - - env: Ubu=14.04 Cmd='make c_standards CC=gcc-6 && make -C tests test-lz4 CC=gcc-6 MOREFLAGS=-Werror' COMPILER=gcc-6 + - name: (Trusty) gcc-6 standard C compilation dist: trusty - sudo: required addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-6 + install: + - export CC=gcc-6 + script: + - make c_standards + - make -C tests test-lz4 MOREFLAGS=-Werror - - env: Ubu=14.04 Cmd='make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static && make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static' COMPILER=arm-linux-gnueabi-gcc + - name: (Trusty) arm + aarch64 compilation dist: trusty - sudo: required addons: apt: packages: @@ -94,23 +120,19 @@ matrix: - libc6-dev-armel-cross - gcc-aarch64-linux-gnu - libc6-dev-arm64-cross + script: + - make platformTest CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static + - make platformTest CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static - - env: Ubu=14.04 Cmd='make -C tests test-lz4 clean test-lz4c32 CC=gcc-5 MOREFLAGS=-Werror' COMPILER=gcc-5 - dist: trusty - sudo: required - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - libc6-dev-i386 - - gcc-multilib - - gcc-5 - - gcc-5-multilib + - name: (Xenial) gcc-5 compilation + dist: xenial + install: + - export CC=gcc-5 + script: + - make -C tests test-lz4 clean test-lz4c32 MOREFLAGS=-Werror - - env: Ubu=14.04 Cmd='make -C tests test-lz4 CC=clang-3.8' COMPILER=clang-3.8 + - name: (Trusty) clang-3.8 compilation dist: trusty - sudo: required addons: apt: sources: @@ -118,29 +140,34 @@ matrix: - llvm-toolchain-precise-3.8 packages: - clang-3.8 + script: + - make -C tests test-lz4 CC=clang-3.8 - - env: Ubu=14.04 Cmd='make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static && make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS=-m64' COMPILER=powerpc-linux-gnu-gcc + - name: (Trusty) PowerPC + PPC64 compilation dist: trusty - sudo: required addons: apt: packages: - qemu-system-ppc - qemu-user-static - gcc-powerpc-linux-gnu + script: + - make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static + - make platformTest CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS=-m64 - - env: Ubu=14.04 Cmd='make staticAnalyze && make cppcheck' COMPILER=clang + - name: (Trusty) scan-build + cppcheck dist: trusty - sudo: required addons: apt: packages: - clang - cppcheck + script: + - make staticAnalyze + - make cppcheck - - env: Ubu=14.04 Cmd='make clean all CC=gcc-4.4 MOREFLAGS=-Werror && make clean && CFLAGS=-fPIC LDFLAGS="-pie -fPIE -D_FORTIFY_SOURCE=2" make -C programs' COMPILER=gcc-4.4 + - name: (Trusty) gcc-4.4 compilation dist: trusty - sudo: required addons: apt: sources: @@ -149,38 +176,41 @@ matrix: - libc6-dev-i386 - gcc-multilib - gcc-4.4 + script: + - make clean all CC=gcc-4.4 MOREFLAGS=-Werror + - make clean + - CFLAGS=-fPIC LDFLAGS='-pie -fPIE -D_FORTIFY_SOURCE=2' make -C programs # tag-specific test - - if: tag =~ ^v[0-9]\.[0-9] + - name: tag build + if: tag =~ ^v[0-9]\.[0-9] os: linux - sudo: false - env: Cmd="make -C tests checkTag && tests/checkTag $TRAVIS_BRANCH " COMPILER=cc - - - dist: xenial - sudo: required - env: BUILD_SYSTEM='meson' + script: + - make -C tests checkTag + - tests/checkTag "$TRAVIS_BRANCH" + + - name: (Xenial) Meson + clang build + env: ALLOW_FAILURES=true + dist: xenial + language: cpp + compiler: clang + install: + - sudo apt-get install -qq python3 tree + - curl -o ~/ninja.zip -L 'https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip' + && unzip ~/ninja.zip -d ~/.local/bin + - curl -o ~/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' + && python3 ~/get-pip.py --user + && pip3 install --user meson + script: + - meson + --buildtype=debug + -Db_lundef=false + -Dauto_features=enabled + -Ddefault_library=both + -Dbuild_{programs,contrib,tests,examples}=true + contrib/meson build + - cd build + - DESTDIR=./staging ninja install + - tree ./staging allow_failures: - - env: BUILD_SYSTEM='meson' - -script: - - if [ "${BUILD_SYSTEM}" = meson ]; then - sudo apt-get install -qq python3 tree - && curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" - && python3 get-pip.py --user && rm get-pip.py - && pip3 install --user meson ninja - && export CC=clang CXX=clang++ - && meson --buildtype=debug - -Db_lundef=false - -Dauto_features=enabled - -Ddefault_library=both - -Dbuild_{programs,contrib,tests,examples}=true - contrib/meson build - && cd "$_" - && DESTDIR=./staging ninja install - && tree ./staging; - travis_terminate "$?"; - fi - - uname -a - - echo Cmd=$Cmd - - $COMPILER -v - - sh -c "$Cmd" + - env: ALLOW_FAILURES=true |