Skip to content

Commit

Permalink
Re-enable Coverity static analysis
Browse files Browse the repository at this point in the history
Manual execution of travisci_build_coverity_scan.sh as a workaround for not building on every job of the build matrix
  • Loading branch information
SRombauts committed Jan 5, 2020
1 parent 852d66d commit a7d9456
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ matrix:
# GCC on Linux
##########################################################################

# Coverity static code analysis
- dist: bionic
env:
- COVERITY_SCAN_PROJECT_NAME=SRombauts/SQLiteCpp
- COVERITY_SCAN_BRANCH_PATTERN=master
- COVERITY_SCAN_NOTIFICATION_EMAIL=sebastien.rombauts@gmail.com
- COVERITY_SCAN_BUILD_COMMAND_PREPEND="cmake ."
- COVERITY_SCAN_BUILD_COMMAND="make -j8"
# Encrypted COVERITY_SCAN_TOKEN, created via the "travis encrypt" command using the project repo's public key
- secure: "Qm4d8NEDPBtYZCYav46uPEvDCtaRsjLXlkVS+C+WCJAPcwXCGkrr96wEi7RWcq2xD86QCh0XiqaPT+xdUmlohOYIovRhaaBmZ1lwIJ4GsG/ZR6xoFr3DYsZ3o4GyXk2vNXNxEl82AC+Xs6e6gkLOV9XRkBcjpVIvoIXgNlKWeGY="

# GCC Debug build with GCov for coverage build
- dist: bionic
env:
Expand Down Expand Up @@ -91,17 +102,17 @@ matrix:
- ASAN=ON

before_install:
# Set the compiler environment variables properly
- export CC=${cc}
- export CXX=${cxx}
- ${CC} --version
- ${CXX} --version
- if [[ "$VALGRIND" == "true" ]]; then sudo apt-get install -qq valgrind ; fi
# Coverity: don't use addons.coverity_scan since it run on every job of the build matrix, which waste resources and exhausts quotas
# Note: the job dedicated to Coverity need to only run the shell script and then exit (to not try to build and run unit tests etc.)
- if [[ -n "$COVERITY_SCAN_PROJECT_NAME" ]] ; then curl -s https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh | bash ; exit 0 ; fi

install:
# coveralls test coverage:
- if [[ "$VALGRIND" == "true" ]]; then sudo apt-get install -qq valgrind ; fi
- if [[ "$COVERALLS" == "true" ]]; then pip install --user cpp-coveralls ; fi

# Set the compiler environment variables properly
- export CC=${cc}
- export CXX=${cxx}

# scripts to run before build
before_script:
- mkdir build
Expand Down

0 comments on commit a7d9456

Please sign in to comment.