0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

Problem: CI doesn't run Valgrind

Solution: run Valgrind only on the default Linux build to avoid
increasing the runtime.
This commit is contained in:
Luca Boccassi 2016-02-05 21:05:11 +00:00
parent 2b2f9046d4
commit ebc7316069
2 changed files with 31 additions and 0 deletions

View File

@ -13,11 +13,14 @@ env:
- BUILD_TYPE=default CURVE=libsodium
- BUILD_TYPE=default
- BUILD_TYPE=coverage CURVE=tweetnacl
- BUILD_TYPE=valgrind CURVE=tweetnacl
matrix:
exclude:
- env: BUILD_TYPE=coverage CURVE=tweetnacl
os: osx
- env: BUILD_TYPE=valgrind CURVE=tweetnacl
os: osx
sudo: false
@ -28,6 +31,7 @@ addons:
packages:
- cmake
- lcov
- valgrind
before_install:
- if [ $TRAVIS_OS_NAME == "osx" ] ; then brew update; brew install binutils ; fi

27
builds/valgrind/ci_build.sh Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -x
mkdir tmp
BUILD_PREFIX=$PWD/tmp
CONFIG_OPTS=()
CONFIG_OPTS+=("CFLAGS=-I${BUILD_PREFIX}/include")
CONFIG_OPTS+=("CPPFLAGS=-I${BUILD_PREFIX}/include")
CONFIG_OPTS+=("CXXFLAGS=-I${BUILD_PREFIX}/include")
CONFIG_OPTS+=("LDFLAGS=-L${BUILD_PREFIX}/lib")
CONFIG_OPTS+=("PKG_CONFIG_PATH=${BUILD_PREFIX}/lib/pkgconfig")
CONFIG_OPTS+=("--prefix=${BUILD_PREFIX}")
CONFIG_OPTS+=("--enable-valgrind")
if [ -z $CURVE ]; then
CONFIG_OPTS+=("--disable-curve")
elif [ $CURVE == "libsodium" ]; then
CONFIG_OPTS+=("--with-libsodium=yes")
git clone --depth 1 -b stable git://github.com/jedisct1/libsodium.git
( cd libsodium; ./autogen.sh; ./configure --prefix=$BUILD_PREFIX; make install)
fi
# Build, check, and install from local source
( cd ../..; ./autogen.sh && ./configure "${CONFIG_OPTS[@]}" && make -j5 && make VERBOSE=1 check-valgrind-memcheck) || exit 1