From b2f253d73245d263ca0724d401a7e5a999fad368 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Tue, 17 Nov 2020 13:09:22 +0800 Subject: [PATCH] copy .travis.yml from master branch --- .travis.yml | 61 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bb309e8..c08466b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,19 @@ env: script: - | if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then - choco install cygwin cyg-get && \ - cyg-get.bat default autoconf automake make gcc-core clang pkg-config libpcre-devel cmake python27-setuptools ruby wget && \ - export SHELLOPTS && set -o igncr \ - cmd.exe //C "C:\\tools\\cygwin\\bin\\bash.exe -lc 'cd /cygdrive/$TRAVIS_BUILD_DIR; make header; make; ./install-cmocka-linux.sh; export PATH="$PATH":/cygdrive/$TRAVIS_BUILD_DIR:/cygdrive/$TRAVIS_BUILD_DIR/cmocka/src; make test'" + if [[ "$TRAVIS_COMPILER" == "clang" ]]; then + choco install cygwin cyg-get && \ + cyg-get.bat default autoconf automake make gcc-core clang pkg-config libpcre-devel cmake python27-setuptools ruby wget && \ + export SHELLOPTS && set -o igncr && \ + cmd.exe //C "C:\\tools\\cygwin\\bin\\bash.exe -lc 'cd /cygdrive/$TRAVIS_BUILD_DIR; make header; make'" + else + choco install cygwin cyg-get && \ + cyg-get.bat default autoconf automake make gcc-core clang pkg-config libpcre-devel cmake python27-setuptools ruby wget && \ + export SHELLOPTS && set -o igncr && \ + cmd.exe //C "C:\\tools\\cygwin\\bin\\bash.exe -lc 'cd /cygdrive/$TRAVIS_BUILD_DIR; make header; make; ./install-cmocka-linux.sh; export PATH="$PATH":/cygdrive/$TRAVIS_BUILD_DIR:/cygdrive/$TRAVIS_BUILD_DIR/cmocka/src; make test'" + fi + elif [[ "$TRAVIS_CPU_ARCH" == "arm64" ]]; then + make header && make && make -C tests/unit test && make -C tests/regress test else make header && make && make -C bindings/go && make -C bindings/go test && make test fi @@ -32,20 +41,36 @@ matrix: osx_image: xcode10.1 python: 3.7 compiler: clang - language: c - env: - - PATH=$PATH:/usr/local/opt/binutils/bin - script: make header && make && make -C tests/unit test && make -C tests/regress test + before_cache: + - brew cleanup + - find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; + cache: + directories: + - $HOME/Library/Caches/Homebrew + - /usr/local/Homebrew + before_install: + - cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core && git stash && git clean -d -f + script: + - cd $TRAVIS_BUILD_DIR + - make header && make && make -C bindings/go && make -C bindings/go test && make test - name: "Compiler: gcc C" os: osx osx_image: xcode10.1 python: 3.7 compiler: gcc - language: c - env: - - PATH=$PATH:/usr/local/opt/binutils/bin - script: make header && make && make -C tests/unit test && make -C tests/regress test + before_cache: + - brew cleanup + - find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; + cache: + directories: + - $HOME/Library/Caches/Homebrew + - /usr/local/Homebrew + before_install: + - cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core && git stash && git clean -d -f + script: + - cd $TRAVIS_BUILD_DIR + - make header && make && make -C bindings/go && make -C bindings/go test && make test - name: "Linux clang ASAN" os: linux @@ -56,7 +81,9 @@ matrix: - CXXFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize=fuzzer-no-link" - CFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize=fuzzer-no-link" - LDFLAGS="-fsanitize=address" - script: make header && make && make -C tests/fuzz && sh tests/fuzz/dlcorpus.sh + script: + - make header && make + - make -C tests/fuzz && sh tests/fuzz/dlcorpus.sh - name: "Linux clang MSAN" os: linux @@ -67,7 +94,9 @@ matrix: - CXXFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=memory -fsanitize=fuzzer-no-link" - CFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=memory -fsanitize=fuzzer-no-link" - LDFLAGS="-fsanitize=memory" - script: make header && make && make -C tests/fuzz && sh tests/fuzz/dlcorpus.sh + script: + - make header && make + - make -C tests/fuzz && sh tests/fuzz/dlcorpus.sh - name: "Linux clang USAN" os: linux @@ -78,7 +107,9 @@ matrix: - CXXFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined -fsanitize=fuzzer-no-link" - CFLAGS="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined -fsanitize=fuzzer-no-link" - LDFLAGS="-fsanitize=undefined" - script: make header && make && make -C tests/fuzz && sh tests/fuzz/dlcorpus.sh + script: + - make header && make + - make -C tests/fuzz && sh tests/fuzz/dlcorpus.sh - name: "Linux 32bit" os: linux