From 18f1ddd38757996c00d126b0d83d5ddc75ef3a3e Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 19 Apr 2017 23:40:44 +0300 Subject: [PATCH] Travis CI: Test also by Coverity Scan --- .travis.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3feb12a..a3aa66e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,15 @@ matrix: - os: linux compiler: gcc - os: osx + - os: linux + addons: + coverity_scan: + project: + name: ivmai/libatomic_ops + version: 7.5.0 + branch_pattern: master + build_command_prepend: "./autogen.sh && ./configure" + build_command: "make -j check CFLAGS_EXTRA=-DLINT2" - os: linux compiler: clang env: @@ -229,20 +238,25 @@ before_install: fi install: - - ./autogen.sh + - if [[ "$COVERITY_SCAN_BRANCH" != 1 ]]; then ./autogen.sh; fi - if [[ "$REPORT_COVERAGE" == true ]]; then gem install coveralls-lcov; fi script: - - ./configure $CONF_OPTIONS --enable-werror - - if [[ "$CSA_CHECK" != true && "$CPPCHECK_ENABLE" == "" ]]; then + - if [[ "$COVERITY_SCAN_BRANCH" != 1 ]]; then + ./configure $CONF_OPTIONS --enable-werror; + fi + - if [[ "$CSA_CHECK" != true && "$CPPCHECK_ENABLE" == "" + && "$COVERITY_SCAN_BRANCH" != 1 ]]; then cat src/config.h; fi - if [[ "$CROSS_GCC_VER" != "" ]]; then CC=$CROSS_CC; fi - - make -j $MAKEFILE_TARGET CC=$CC CFLAGS_EXTRA="$CFLAGS_EXTRA" + - if [[ "$COVERITY_SCAN_BRANCH" != 1 ]]; then + make -j $MAKEFILE_TARGET CC=$CC CFLAGS_EXTRA="$CFLAGS_EXTRA"; + fi - if [ -f tests/test_atomic.log ]; then cat tests/test_atomic*.log; fi - if [[ "$CSA_CHECK" == true ]]; then ${CC} --analyze -Xanalyzer -analyzer-output=text -Werror -I src -- 2.40.0