summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2015-06-07 00:29:30 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2015-06-07 00:42:38 -0700
commite4a928b270eb6b84dcd7ce03f97b981c417cd587 (patch)
treef0c9ec2832d11457aca918959b3db0b1d44ec9d7
parent426a3a78325927145c602e8462a7cb489db02327 (diff)
downloadrabbitmq-c-ci_builds.tar.gz
ci: add asan and tsan builds to travis ci.ci_builds
asan = address sanitizer tsan = thread sanitizer
-rw-r--r--.travis.yml20
-rwxr-xr-xtravis.sh22
2 files changed, 32 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml
index fd74312..d5d3fa9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,10 +8,6 @@ language: c
# been resolved.
sudo: required
-compiler:
- - gcc
- - clang
-
# OSX isn't actually enabled at this point as we missed the boat. Hopefully
# they re-open sign-ups for OSS projects sometime soon.
os:
@@ -24,9 +20,19 @@ env:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "gDwqo3jHj+HHGzFKnxL/nwZhbVeh2pItw0TbeaHcLtWubUZaf85ViEQRaXPyfnbG7l0OEQq+PjyhKAfvViVq2NP0lGeeu4VM5uMZJhsCLN594BJr39Y4XzOapg0O8mEMhQ0DU2u1Zo4LMgEcRz67aosVQOj6QV30tOzp9fnxn9U="
- matrix:
- - CONFIG=cmake
- - CONFIG=autotools
+
+matrix:
+ include:
+ - compiler: gcc
+ env: CONFIG=autotools
+ - compiler: gcc
+ env: CONFIG=cmake
+ - compiler: clang
+ env: CONFIG=cmake
+ - compiler: clang
+ env: CONFIG=asan
+ - compiler: clang
+ env: CONFIG=tsan
# Make sure CMake is installed
install:
diff --git a/travis.sh b/travis.sh
index aab940a..7fc8453 100755
--- a/travis.sh
+++ b/travis.sh
@@ -7,15 +7,31 @@ build_autotools() {
}
build_cmake() {
- mkdir $PWD/_build
- cd $PWD/_build
+ CFLAGS="-fsanitize=undefined"
+ mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install
cmake --build . --target install
ctest -V .
}
+build_asan() {
+ mkdir $PWD/_build && cd $PWD/_build
+ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
+ -DCMAKE_C_FLAGS="-fsanitize=address,undefined -O1"
+ cmake --build . --target install
+ ctest -V .
+}
+
+build_tsan() {
+ mkdir $PWD/_build && cd $PWD/_build
+ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
+ -DCMAKE_C_FLAGS="-fsanitize=thread,undefined -O1"
+ cmake --build . --target install
+ ctest -V .
+}
+
if [ "$#" -ne 1 ]; then
- echo "Usage: $0 {autotools|cmake}"
+ echo "Usage: $0 {autotools|cmake|asan|tsan}"
exit 1
fi