summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2016-01-12 23:08:57 -0800
committerAlan Antonuk <alan.antonuk@gmail.com>2016-01-13 07:23:02 -0800
commitd4b43989f117c51c33a215ae1b5b06533d6f279b (patch)
tree05672718bfcd3232b31ace4b267b0e69ac1c9df3
parenta0fa4099048c2d6d05ff67597193759a8bd69aba (diff)
downloadrabbitmq-c-scan-build.tar.gz
CI: add clang-analyzer build on travis.scan-build
-rw-r--r--.travis.yml11
-rwxr-xr-xtravis.sh10
2 files changed, 20 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index d44156a..178de61 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,6 +32,9 @@ matrix:
os: linux
env: CONFIG=tsan
- compiler: clang
+ os: linux
+ env: CONFIG=scan-build
+ - compiler: clang
os: osx
env: CONFIG=cmake
@@ -49,8 +52,16 @@ script:
addons:
apt:
+ # List of whitelisted in travis packages for ubuntu-precise can be found here:
+ # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
+ # List of whitelisted in travis apt-sources:
+ # https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
+ sources:
+ - ubuntu-toolchain-r-test
+ - llvm-toolchain-precise-3.7
packages:
- libpopt-dev
+ - clang-3.7
coverity_scan:
project:
diff --git a/travis.sh b/travis.sh
index f5c67c6..2d9ef6c 100755
--- a/travis.sh
+++ b/travis.sh
@@ -29,8 +29,16 @@ build_tsan() {
ctest -V .
}
+build_scan-build() {
+ mkdir $PWD/_build && cd $PWD/_build
+ scan-build-3.7 cmake .. -DCMAKE_BUILD_TYPE=Debug \
+ -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
+ -DCMAKE_C_FLAGS="-Werror"
+ scan-build-3.7 make install
+}
+
if [ "$#" -ne 1 ]; then
- echo "Usage: $0 {autotools|cmake|asan|tsan}"
+ echo "Usage: $0 {autotools|cmake|asan|tsan|scan-build}"
exit 1
fi