Skip to content

Commit 0a6c13a

Browse files
committed
travis: do not execute Coverity analysis for all cron jobs
The new Travis cron job gets executed daily, but our current configuration will cause each job to execute our Coverity script instead of the default build and testing scripts. This cannot work, as Coverity is heavily rate-limiting its API, so our cron builds are doomed to always fail. What we want to do instead is execute our normal builds, but add an additional Coverity jobs. This can easily be done by adding another Coverity-specific job with a conditional "type = cron", which sets the "COVERITY" environment variable. Instead of checking the build type, we then simply check whether "COVERITY" is set or not.
1 parent 64138b7 commit 0a6c13a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ matrix:
6565
- MBEDTLS=1
6666
CMAKE_OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON -DUSE_HTTPS=mbedTLS -DSHA1_BACKEND=mbedTLS -DMBEDTLS_ROOT_DIR=/tmp/mbedtls"
6767
os: linux
68-
allow_failures:
69-
- env: COVERITY=1
68+
- compiler: gcc
69+
if: type = cron
70+
env:
71+
- CMAKE_OPTIONS="-DBUILD_CLAR=ON -DCMAKE_BUILD_TYPE=Debug"
72+
COVERITY=1
73+
os: linux
7074

7175
install:
7276
- if [ -f ./ci/setup-${TRAVIS_OS_NAME}.sh ]; then ./ci/setup-${TRAVIS_OS_NAME}.sh; fi
@@ -75,8 +79,8 @@ install:
7579
script:
7680
- mkdir build
7781
- cd build
78-
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then ../ci/coverity.sh; fi
79-
- if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then ../ci/build.sh && ../ci/test.sh; fi
82+
- if [ -n "$COVERITY" ]; then ../ci/coverity.sh; fi
83+
- if [ -z "$COVERITY" ]; then ../ci/build.sh && ../ci/test.sh; fi
8084

8185
# Only watch the development and master branches
8286
branches:

0 commit comments

Comments
 (0)