mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-26 23:01:04 +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:
parent
2b2f9046d4
commit
ebc7316069
@ -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
27
builds/valgrind/ci_build.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user