2013-01-26 19:28:19 +00:00
|
|
|
language: c
|
|
|
|
compiler:
|
|
|
|
- gcc
|
|
|
|
- clang
|
|
|
|
|
2016-06-20 04:49:44 +00:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
2019-08-04 09:13:04 +00:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- staging
|
|
|
|
- trying
|
|
|
|
- master
|
2020-03-14 22:09:37 +00:00
|
|
|
- /^release\/.*$/
|
2019-08-04 09:13:04 +00:00
|
|
|
|
2016-06-20 05:05:34 +00:00
|
|
|
before_script:
|
2020-07-09 00:06:30 +00:00
|
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
|
|
|
curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.6.2-10.13-HighSierra.pkg;
|
|
|
|
sudo installer -pkg MacPorts-2.6.2-10.13-HighSierra.pkg -target /;
|
|
|
|
export PATH=$PATH:/opt/local/bin && sudo port -v selfupdate;
|
|
|
|
sudo port -N install openssl redis;
|
|
|
|
fi;
|
2016-06-20 05:05:34 +00:00
|
|
|
|
2015-07-27 21:43:17 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
2020-07-20 01:54:42 +00:00
|
|
|
sources:
|
|
|
|
- sourceline: 'ppa:chris-lea/redis-server'
|
2015-07-27 21:43:17 +00:00
|
|
|
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
|
2020-04-13 16:32:32 +00:00
|
|
|
- libssl-dev
|
|
|
|
- libssl-dev:i386
|
2015-07-27 21:43:17 +00:00
|
|
|
- valgrind
|
2020-07-20 01:54:42 +00:00
|
|
|
- redis
|
2015-07-27 21:43:17 +00:00
|
|
|
|
2015-01-22 20:31:43 +00:00
|
|
|
env:
|
2019-01-21 20:14:33 +00:00
|
|
|
- BITS="32"
|
|
|
|
- BITS="64"
|
|
|
|
|
|
|
|
script:
|
2020-04-13 16:32:32 +00:00
|
|
|
- EXTRA_CMAKE_OPTS="-DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON";
|
2019-02-21 17:09:17 +00:00
|
|
|
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
|
2020-04-13 16:32:32 +00:00
|
|
|
- make && make clean;
|
|
|
|
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
|
|
|
if [ "$BITS" == "64" ]; then
|
|
|
|
OPENSSL_PREFIX="$(ls -d /usr/local/Cellar/openssl@1.1/*)" USE_SSL=1 make;
|
|
|
|
fi;
|
|
|
|
else
|
|
|
|
USE_SSL=1 make;
|
|
|
|
fi;
|
2019-01-21 20:14:33 +00:00
|
|
|
- mkdir build/ && cd build/
|
|
|
|
- cmake .. ${EXTRA_CMAKE_OPTS}
|
|
|
|
- make VERBOSE=1
|
2020-04-03 05:41:34 +00:00
|
|
|
- SKIPS_AS_FAILS=1 ctest -V
|
2019-05-08 14:25:12 +00:00
|
|
|
|
2020-04-03 05:41:34 +00:00
|
|
|
jobs:
|
2019-05-08 14:25:12 +00:00
|
|
|
include:
|
|
|
|
# Windows MinGW cross compile on Linux
|
|
|
|
- os: linux
|
|
|
|
dist: xenial
|
|
|
|
compiler: mingw
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- ninja-build
|
|
|
|
- gcc-mingw-w64-x86-64
|
|
|
|
- g++-mingw-w64-x86-64
|
|
|
|
script:
|
|
|
|
- mkdir build && cd build
|
|
|
|
- CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=on
|
|
|
|
- ninja -v
|
2019-05-08 14:32:49 +00:00
|
|
|
|
|
|
|
# Windows MSVC 2017
|
|
|
|
- os: windows
|
|
|
|
compiler: msvc
|
|
|
|
env:
|
|
|
|
- MATRIX_EVAL="CC=cl.exe && CXX=cl.exe"
|
|
|
|
before_install:
|
|
|
|
- eval "${MATRIX_EVAL}"
|
|
|
|
install:
|
|
|
|
- choco install ninja
|
2020-07-09 00:06:30 +00:00
|
|
|
- choco install -y memurai-developer
|
2019-05-08 14:32:49 +00:00
|
|
|
script:
|
|
|
|
- mkdir build && cd build
|
2020-02-28 05:29:05 +00:00
|
|
|
- cmd.exe //C 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' amd64 '&&'
|
2020-07-10 19:53:52 +00:00
|
|
|
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_EXAMPLES=ON '&&' ninja -v
|
2020-04-03 05:41:34 +00:00
|
|
|
- ./hiredis-test.exe
|