Commit 9275d84c583a030e759edbfafacf99c42a83c543

Edward Thomson 2018-08-06T13:14:08

Merge pull request #4755 from pks-t/pks/travis-coverity-cron travis: do not execute Coverity analysis for all cron jobs

diff --git a/.travis.yml b/.travis.yml
index 09fcdc7..40f1d23 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -65,8 +65,12 @@ matrix:
        - MBEDTLS=1
          CMAKE_OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON -DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS -DMBEDTLS_ROOT_DIR=/tmp/mbedtls"
      os: linux
- allow_failures:
-   - env: COVERITY=1
+   - compiler: gcc
+     if: type = cron
+     env:
+       - CMAKE_OPTIONS="-DBUILD_CLAR=ON -DCMAKE_BUILD_TYPE=Debug"
+         COVERITY=1
+     os: linux
 
 install:
   - if [ -f ./ci/setup-${TRAVIS_OS_NAME}.sh ]; then ./ci/setup-${TRAVIS_OS_NAME}.sh; fi
@@ -75,8 +79,8 @@ install:
 script:
  - mkdir build
  - cd build
- - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then ../ci/coverity.sh; fi
- - if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then ../ci/build.sh && ../ci/test.sh; fi
+ - if [ -n "$COVERITY" ]; then ../ci/coverity.sh; fi
+ - if [ -z "$COVERITY" ]; then ../ci/build.sh && ../ci/test.sh; fi
 
 # Only watch the development and master branches
 branches: