blob: c1d7b2d11a57be16c6cb5b972a18cd2150fa8c56 [file] [log] [blame]
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +05001sudo: required
2dist: xenial
3
4language: c
5
Ilya Shipitsin054a5b82019-05-03 14:31:20 +05006env:
7 global:
Ilya Shipitsin862d6932019-06-16 01:19:27 +05008 - FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=contrib/wurfl WURFL_LIB=contrib/wurfl USE_DEVICEATLAS=1 DEVICEATLAS_SRC=contrib/deviceatlas USE_51DEGREES=1"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +05009 - SSL_LIB=${HOME}/opt/lib
10 - SSL_INC=${HOME}/opt/include
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050011 - TMPDIR=/tmp
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050012 - FIFTYONEDEGREES_SRC="contrib/51d/src/pattern"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050013
Tim Duesterhus88c63a62019-04-24 19:11:09 +050014addons:
15 apt:
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050016 packages: [ liblua5.3-dev, libsystemd-dev ]
Tim Duesterhus88c63a62019-04-24 19:11:09 +050017
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050018cache:
19 directories:
20 - download-cache
21 - ${HOME}/opt
22
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050023matrix:
24 include:
Tim Duesterhus88c63a62019-04-24 19:11:09 +050025 - os: linux
26 compiler: gcc
Willy Tarreauc26b4672019-06-14 18:32:34 +020027 env: TARGET=linux-glibc FIFTYONEDEGREES_SRC="contrib/51d/src/trie"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050028 - os: linux-ppc64le
29 compiler: gcc
Willy Tarreauc26b4672019-06-14 18:32:34 +020030 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1c LABEL="linux-ppc64le"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050031 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050032 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020033 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1c
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050034 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050035 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020036 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.0j
Tim Duesterhus88c63a62019-04-24 19:11:09 +050037 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050038 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020039 env: TARGET=linux-glibc OPENSSL_VERSION=1.0.2r
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050040 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050041 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020042 env: TARGET=linux-glibc LIBRESSL_VERSION=2.9.2
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050043 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050044 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020045 env: TARGET=linux-glibc LIBRESSL_VERSION=2.8.3
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050046 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050047 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020048 env: TARGET=linux-glibc LIBRESSL_VERSION=2.7.5 EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050049 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050050 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020051 env: TARGET=linux-glibc BORINGSSL=yes
Ilya Shipitsin35d20af2019-05-09 01:15:59 +050052 - os: linux
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050053 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020054 env: TARGET=linux-glibc FLAGS=
Tim Duesterhus88c63a62019-04-24 19:11:09 +050055 - os: osx
56 compiler: clang
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050057 env: TARGET=osx FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1c
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050058 - os: windows
59 install:
60 - choco install bash make libssl-devel cygwin-devel gcc-core libgcc1 binutils lua-devel libpcre-devel zlib-devel --source cygwin
61 script:
62 - C:\\tools\\cygwin\\bin\\bash -lc 'cd $OLDPWD && make TARGET=cygwin USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_THREAD=1 && ./haproxy -vv'
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050063
64install:
65 - git clone https://github.com/VTest/VTest.git ../vtest
Tim Duesterhus88c63a62019-04-24 19:11:09 +050066 # Special flags due to: https://github.com/vtest/VTest/issues/12
67 - make -C ../vtest FLAGS="-O2 -s -Wall"
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050068 - scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1)
Tim Duesterhus88c63a62019-04-24 19:11:09 +050069
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050070script:
Ilya Shipitsin46166c22019-05-22 20:12:15 +050071 - if [ "${CC}" = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"; fi
72 - make -C contrib/wurfl
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050073 - make -j3 CC=$CC V=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050074 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"; fi
75 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${HOME}/opt/lib:${DYLD_LIBRARY_PATH:-}"; fi
Tim Duesterhus88c63a62019-04-24 19:11:09 +050076 - ./haproxy -vv
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050077 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
78 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050079 - env VTEST_PROGRAM=../vtest/vtest make reg-tests
Tim Duesterhus88c63a62019-04-24 19:11:09 +050080
81after_failure:
82 - |
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050083 for folder in ${TMPDIR}/*regtest*/vtc.*; do
Tim Duesterhus88c63a62019-04-24 19:11:09 +050084 cat $folder/INFO
85 cat $folder/LOG
86 done