blob: 032ee13cc401439c5d6c03a379c1988676fa89a4 [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 Shipitsina088d3d2019-06-05 02:16:51 +05008 - FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_GETADDRINFO=1 USE_TFO=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=contrib/wurfl WURFL_LIB=contrib/wurfl USE_DEVICEATLAS=1 DEVICEATLAS_SRC=contrib/deviceatlas"
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 Shipitsin054a5b82019-05-03 14:31:20 +050012
Tim Duesterhus88c63a62019-04-24 19:11:09 +050013addons:
14 apt:
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050015 packages: [ liblua5.3-dev, libsystemd-dev ]
Tim Duesterhus88c63a62019-04-24 19:11:09 +050016
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050017cache:
18 directories:
19 - download-cache
20 - ${HOME}/opt
21
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050022matrix:
23 include:
Tim Duesterhus88c63a62019-04-24 19:11:09 +050024 - os: linux
25 compiler: gcc
26 env: TARGET=linux2628 FLAGS=
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050027 - os: linux-ppc64le
28 compiler: gcc
29 env: TARGET=linux2628 OPENSSL_VERSION=1.1.1b LABEL="linux-ppc64le"
30 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050031 compiler: clang
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050032 env: TARGET=linux2628 OPENSSL_VERSION=1.1.1b
33 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050034 compiler: clang
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050035 env: TARGET=linux2628 OPENSSL_VERSION=1.1.0j
Tim Duesterhus88c63a62019-04-24 19:11:09 +050036 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050037 compiler: clang
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050038 env: TARGET=linux2628 OPENSSL_VERSION=1.0.2r
39 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050040 compiler: clang
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050041 env: TARGET=linux2628 LIBRESSL_VERSION=2.9.2
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050042 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050043 compiler: clang
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050044 env: TARGET=linux2628 LIBRESSL_VERSION=2.8.3
45 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050046 compiler: clang
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050047 env: TARGET=linux2628 LIBRESSL_VERSION=2.7.5 EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050048 - os: linux
Ilya Shipitsin46166c22019-05-22 20:12:15 +050049 compiler: clang
Ilya Shipitsin35d20af2019-05-09 01:15:59 +050050 env: TARGET=linux2628 BORINGSSL=yes
51 - os: linux
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050052 compiler: clang
Tim Duesterhus88c63a62019-04-24 19:11:09 +050053 env: TARGET=linux2628 FLAGS=
54 - os: osx
55 compiler: clang
Ilya Shipitsin46166c22019-05-22 20:12:15 +050056 env: TARGET=osx FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1b
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050057 - os: windows
58 install:
59 - choco install bash make libssl-devel cygwin-devel gcc-core libgcc1 binutils lua-devel libpcre-devel zlib-devel --source cygwin
60 script:
61 - 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 +050062
63install:
64 - git clone https://github.com/VTest/VTest.git ../vtest
Tim Duesterhus88c63a62019-04-24 19:11:09 +050065 # Special flags due to: https://github.com/vtest/VTest/issues/12
66 - make -C ../vtest FLAGS="-O2 -s -Wall"
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050067 - scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1)
Tim Duesterhus88c63a62019-04-24 19:11:09 +050068
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050069script:
Ilya Shipitsin46166c22019-05-22 20:12:15 +050070 - if [ "${CC}" = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"; fi
71 - make -C contrib/wurfl
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050072 - make -j3 CC=$CC V=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" EXTRA_OBJS="$EXTRA_OBJS"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050073 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"; fi
74 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${HOME}/opt/lib:${DYLD_LIBRARY_PATH:-}"; fi
Tim Duesterhus88c63a62019-04-24 19:11:09 +050075 - ./haproxy -vv
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050076 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
77 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050078 - env VTEST_PROGRAM=../vtest/vtest make reg-tests
Tim Duesterhus88c63a62019-04-24 19:11:09 +050079
80after_failure:
81 - |
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050082 for folder in ${TMPDIR}/*regtest*/vtc.*; do
Tim Duesterhus88c63a62019-04-24 19:11:09 +050083 cat $folder/INFO
84 cat $folder/LOG
85 done