2013-01-26 19:28:19 +00:00
|
|
|
language: c
|
2015-07-27 21:43:17 +00:00
|
|
|
sudo: false
|
2013-01-26 19:28:19 +00:00
|
|
|
compiler:
|
|
|
|
- gcc
|
|
|
|
- clang
|
|
|
|
|
2016-06-20 04:49:44 +00:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
2016-06-20 05:05:34 +00:00
|
|
|
before_script:
|
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] ; then brew update; brew install redis; fi
|
|
|
|
|
2015-07-27 21:43:17 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libc6-dbg
|
|
|
|
- libc6-dev
|
|
|
|
- libc6:i386
|
|
|
|
- libc6-dev-i386
|
|
|
|
- libc6-dbg:i386
|
|
|
|
- gcc-multilib
|
2019-01-21 20:14:33 +00:00
|
|
|
- g++-multilib
|
2015-07-27 21:43:17 +00:00
|
|
|
- valgrind
|
|
|
|
|
2015-01-22 20:31:43 +00:00
|
|
|
env:
|
2019-01-21 20:14:33 +00:00
|
|
|
- BITS="32"
|
|
|
|
- BITS="64"
|
|
|
|
|
|
|
|
script:
|
2019-02-21 17:09:17 +00:00
|
|
|
- EXTRA_CMAKE_OPTS="-DENABLE_EXAMPLES:BOOL=ON -DHIREDIS_SSL:BOOL=ON";
|
|
|
|
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
2019-01-21 20:14:33 +00:00
|
|
|
if [ "$BITS" == "32" ]; then
|
|
|
|
CFLAGS="-m32 -Werror";
|
|
|
|
CXXFLAGS="-m32 -Werror";
|
|
|
|
LDFLAGS="-m32";
|
2019-02-21 17:09:17 +00:00
|
|
|
EXTRA_CMAKE_OPTS=;
|
2019-01-21 20:14:33 +00:00
|
|
|
else
|
|
|
|
CFLAGS="-Werror";
|
|
|
|
CXXFLAGS="-Werror";
|
|
|
|
fi;
|
|
|
|
else
|
|
|
|
TEST_PREFIX="valgrind --track-origins=yes --leak-check=full";
|
|
|
|
if [ "$BITS" == "32" ]; then
|
|
|
|
CFLAGS="-m32 -Werror";
|
|
|
|
CXXFLAGS="-m32 -Werror";
|
|
|
|
LDFLAGS="-m32";
|
2019-02-21 17:09:17 +00:00
|
|
|
EXTRA_CMAKE_OPTS=;
|
2019-01-21 20:14:33 +00:00
|
|
|
else
|
|
|
|
CFLAGS="-Werror";
|
|
|
|
CXXFLAGS="-Werror";
|
|
|
|
fi;
|
|
|
|
fi;
|
|
|
|
export CFLAGS CXXFLAGS LDFLAGS TEST_PREFIX EXTRA_CMAKE_OPTS
|
|
|
|
- mkdir build/ && cd build/
|
|
|
|
- cmake .. ${EXTRA_CMAKE_OPTS}
|
|
|
|
- make VERBOSE=1
|
|
|
|
- ctest -V
|