2014-01-28 18:53:48 +08:00
|
|
|
env:
|
2019-10-21 12:33:12 +08:00
|
|
|
global:
|
|
|
|
- CLANG_FORMAT_VERSION=9
|
2014-01-28 18:53:48 +08:00
|
|
|
matrix:
|
|
|
|
- JANSSON_BUILD_METHOD=cmake JANSSON_CMAKE_OPTIONS="-DJANSSON_TEST_WITH_VALGRIND=ON" JANSSON_EXTRA_INSTALL="valgrind"
|
|
|
|
- JANSSON_BUILD_METHOD=autotools
|
2014-12-11 05:30:33 +08:00
|
|
|
- JANSSON_BUILD_METHOD=coverage JANSSON_CMAKE_OPTIONS="-DJANSSON_COVERAGE=ON -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug" JANSSON_EXTRA_INSTALL="lcov curl"
|
2019-06-28 20:22:51 +08:00
|
|
|
- JANSSON_BUILD_METHOD=fuzzer
|
2019-10-21 12:33:12 +08:00
|
|
|
- JANSSON_BUILD_METHOD=lint CLANG_FORMAT=clang-format-9
|
2019-10-17 16:13:00 +08:00
|
|
|
dist: bionic
|
2012-12-23 13:09:55 +08:00
|
|
|
language: c
|
|
|
|
compiler:
|
|
|
|
- gcc
|
|
|
|
- clang
|
2014-12-11 05:30:33 +08:00
|
|
|
matrix:
|
|
|
|
exclude:
|
|
|
|
- compiler: clang
|
|
|
|
env: JANSSON_BUILD_METHOD=coverage JANSSON_CMAKE_OPTIONS="-DJANSSON_COVERAGE=ON -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug" JANSSON_EXTRA_INSTALL="lcov curl"
|
2019-07-24 17:39:35 +08:00
|
|
|
- compiler: clang
|
|
|
|
env: JANSSON_BUILD_METHOD=fuzzer
|
2019-10-17 16:13:00 +08:00
|
|
|
- compiler: gcc
|
2019-10-21 12:33:12 +08:00
|
|
|
env: JANSSON_BUILD_METHOD=lint CLANG_FORMAT=clang-format-9
|
2014-12-11 05:30:33 +08:00
|
|
|
allow_failures:
|
|
|
|
- env: JANSSON_BUILD_METHOD=coverage JANSSON_CMAKE_OPTIONS="-DJANSSON_COVERAGE=ON -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug" JANSSON_EXTRA_INSTALL="lcov curl"
|
2014-01-28 18:53:48 +08:00
|
|
|
install:
|
|
|
|
- sudo apt-get update -qq
|
|
|
|
- sudo apt-get install -y -qq cmake $JANSSON_EXTRA_INSTALL
|
2019-10-17 16:13:00 +08:00
|
|
|
- if [ "$TRAVIS_COMPILER" = "clang" ]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main" -y && sudo apt-get install -y -qq clang-9 clang-format-9; fi
|
2014-01-28 18:53:48 +08:00
|
|
|
script:
|
|
|
|
- if [ "$JANSSON_BUILD_METHOD" = "autotools" ]; then autoreconf -f -i && CFLAGS=-Werror ./configure && make check; fi
|
2014-12-11 05:30:33 +08:00
|
|
|
- if [ "$JANSSON_BUILD_METHOD" = "cmake" ]; then mkdir build && cd build && cmake $JANSSON_CMAKE_OPTIONS .. && cmake --build . && ctest --output-on-failure; fi
|
|
|
|
- if [ "$JANSSON_BUILD_METHOD" = "coverage" ]; then mkdir build && cd build && cmake $JANSSON_CMAKE_OPTIONS .. && cmake --build . && cmake --build . --target coveralls; fi
|
2019-07-18 21:49:07 +08:00
|
|
|
- if [ "$JANSSON_BUILD_METHOD" = "fuzzer" ]; then ./test/ossfuzz/travisoss.sh; fi
|
2019-10-21 12:33:12 +08:00
|
|
|
- if [ "$JANSSON_BUILD_METHOD" = "lint" ]; then ./scripts/clang-format-check; fi
|