Skip to content

Commit 58b75cf

Browse files
Merge pull request diffblue#1307 from zemanlx/coverity
TG-442 Add Coverity scan
2 parents a400c23 + 177a13d commit 58b75cf

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.travis.yml

+37
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,43 @@ jobs:
127127
- cmake --build build -- -j4
128128
script: (cd build; ctest -V -L CORE)
129129

130+
# Run Coverity
131+
- stage: Test different OS/CXX/Flags
132+
os: linux
133+
sudo: required
134+
compiler: gcc
135+
cache: ccache
136+
addons:
137+
apt:
138+
sources:
139+
- ubuntu-toolchain-r-test
140+
packages:
141+
- libwww-perl
142+
- g++-5
143+
coverity_scan:
144+
project:
145+
name: "diffblue/cbmc"
146+
description: "Travis build of ${TRAVIS_COMMIT}"
147+
notification_email: "[email protected]"
148+
build_command_prepend: "make -C src minisat2-download"
149+
build_command: "make -C src -j2"
150+
branch_pattern: "develop"
151+
before_install:
152+
- |
153+
if [[ "${TRAVIS_EVENT_TYPE}" != "cron" ]]
154+
then
155+
echo "This is not a cron build and build is not needed."
156+
travis_terminate 0
157+
fi
158+
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
159+
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90
160+
- g++ --version
161+
# Coverity runs as part of before_script
162+
env:
163+
- NAME="COVERITY_SCAN"
164+
- COMPILER="ccache g++"
165+
script: echo "This is coverity build. No need for tests."
166+
130167
allow_failures:
131168
- <<: *linter-stage
132169

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![Build Status][travis_img]][travis] [![Build Status][appveyor_img]][appveyor]
2+
[![Build Status][coverity_img]][coverity]
23

34
[CProver Wiki](http://www.cprover.org/wiki)
45

@@ -47,4 +48,6 @@ License
4748
[travis]: https://travis-ci.org/diffblue/cbmc
4849
[travis_img]: https://travis-ci.org/diffblue/cbmc.svg?branch=master
4950
[appveyor]: https://ci.appveyor.com/project/diffblue/cbmc/
50-
[appveyor_img]: https://ci.appveyor.com/api/projects/status/github/diffblue/cbmc?svg=true&branch=master
51+
[appveyor_img]: https://ci.appveyor.com/api/projects/status/github/diffblue/cbmc?svg=true&branch=master
52+
[coverity]: https://scan.coverity.com/projects/diffblue-cbmc
53+
[coverity_img]: https://scan.coverity.com/projects/13552/badge.svg

0 commit comments

Comments
 (0)