From dc667f47a4e3355740260371390b023160e82909 Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Fri, 25 Dec 2015 20:47:31 -0800 Subject: CI: build only 1 matrix slot on coverity branch Coverity has a limited number of scans that can be submitted per-week. Preserve the limited number of scans that are done by only building one of the lines of the build matrix on travis. --- .travis.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index cdc0816..d44156a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,8 @@ env: matrix: include: + # Note that the first compiler in the matrix must be gcc, so that the + # coverity_scan branch hack below works correctly. - compiler: gcc os: linux env: CONFIG=autotools @@ -33,9 +35,17 @@ matrix: os: osx env: CONFIG=cmake -# Run the Build script +before_install: + # ugly hack; if running a coverity scan abort all except the 1st build + # see note re gcc compiler above needing to be 1st + # also note that branch_pattern & the TRAVIS_BRANCH check must match + # unfortunately COVERITY_SCAN_BRANCH isn't defined until later in the + # build process + - if ([[ "${TRAVIS_JOB_NUMBER##*.}" != "1" ]] && [[ "${TRAVIS_BRANCH}" == "coverity_scan" ]]); then false ; fi + script: - - ./travis.sh $CONFIG + # Don't bother building if this is being done in the coverity_scan branch. + - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./travis.sh $CONFIG ; fi addons: apt: -- cgit v1.2.1