@@ -16,6 +16,17 @@ matrix:
16
16
# GCC on Linux
17
17
# #########################################################################
18
18
19
+ # Coverity static code analysis
20
+ - dist : bionic
21
+ env :
22
+ - COVERITY_SCAN_PROJECT_NAME=SRombauts/SQLiteCpp
23
+ - COVERITY_SCAN_BRANCH_PATTERN=master
24
+
25
+ - COVERITY_SCAN_BUILD_COMMAND_PREPEND="cmake ."
26
+ - COVERITY_SCAN_BUILD_COMMAND="make -j8"
27
+ # Encrypted COVERITY_SCAN_TOKEN, created via the "travis encrypt" command using the project repo's public key
28
+ - secure : " Qm4d8NEDPBtYZCYav46uPEvDCtaRsjLXlkVS+C+WCJAPcwXCGkrr96wEi7RWcq2xD86QCh0XiqaPT+xdUmlohOYIovRhaaBmZ1lwIJ4GsG/ZR6xoFr3DYsZ3o4GyXk2vNXNxEl82AC+Xs6e6gkLOV9XRkBcjpVIvoIXgNlKWeGY="
29
+
19
30
# GCC Debug build with GCov for coverage build
20
31
- dist : bionic
21
32
env :
@@ -91,17 +102,17 @@ matrix:
91
102
- ASAN=ON
92
103
93
104
before_install :
94
- # Set the compiler environment variables properly
95
- - export CC=${cc}
96
- - export CXX=${cxx}
97
- - ${CC} --version
98
- - ${CXX} --version
99
- - if [[ "$VALGRIND" == "true" ]]; then sudo apt-get install -qq valgrind ; fi
105
+ # Coverity: don't use addons.coverity_scan since it run on every job of the build matrix, which waste resources and exhausts quotas
106
+ # 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.)
107
+ - if [[ -n "$COVERITY_SCAN_PROJECT_NAME" ]] ; then curl -s https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh | bash ; exit 0 ; fi
100
108
101
- install :
102
- # coveralls test coverage:
109
+ - if [[ "$VALGRIND" == "true" ]]; then sudo apt-get install -qq valgrind ; fi
103
110
- if [[ "$COVERALLS" == "true" ]]; then pip install --user cpp-coveralls ; fi
104
111
112
+ # Set the compiler environment variables properly
113
+ - export CC=${cc}
114
+ - export CXX=${cxx}
115
+
105
116
# scripts to run before build
106
117
before_script :
107
118
- mkdir build
0 commit comments