blob: a656624969559d98eca1c2e2028f75469874a2ca [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:
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050025 - os: linux-ppc64le
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050026 if: type == cron
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050027 compiler: gcc
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050028 env: TARGET=linux-glibc OPENSSL_VERSION=1.0.2r LABEL="linux-ppc64le"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050029 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050030 if: type != cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050031 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020032 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1c
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050033 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050034 if: type == cron
35 compiler: clang
36 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1c COVERITY_SCAN_PROJECT_NAME="Haproxy" COVERITY_SCAN_BRANCH_PATTERN="*" COVERITY_SCAN_NOTIFICATION_EMAIL="chipitsine@gmail.com" COVERITY_SCAN_BUILD_COMMAND="make CC=clang TARGET=$TARGET $FLAGS 51DEGREES_SRC=$FIFTYONEDEGREES_SRC"
37 script:
38 - |
39 if [ ! -z ${COVERITY_SCAN_TOKEN+x} ]; then
40 make -C contrib/wurfl
41 curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true
42 fi
43 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050044 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050045 compiler: clang
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050046 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.0j FIFTYONEDEGREES_SRC="contrib/51d/src/trie"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050047 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050048 if: type != cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050049 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020050 env: TARGET=linux-glibc LIBRESSL_VERSION=2.9.2
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050051 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050052 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050053 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020054 env: TARGET=linux-glibc LIBRESSL_VERSION=2.8.3
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050055 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050056 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050057 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020058 env: TARGET=linux-glibc LIBRESSL_VERSION=2.7.5 EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050059 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050060 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050061 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020062 env: TARGET=linux-glibc BORINGSSL=yes
Ilya Shipitsin35d20af2019-05-09 01:15:59 +050063 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050064 if: type != cron
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050065 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020066 env: TARGET=linux-glibc FLAGS=
Tim Duesterhus88c63a62019-04-24 19:11:09 +050067 - os: osx
Ilya Shipitsin1b772622019-08-02 22:59:03 +050068 if: type != cron
Tim Duesterhus88c63a62019-04-24 19:11:09 +050069 compiler: clang
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050070 env: TARGET=osx FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1c
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050071 - os: windows
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050072 if: type == cron
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050073 install:
74 - choco install bash make libssl-devel cygwin-devel gcc-core libgcc1 binutils lua-devel libpcre-devel zlib-devel --source cygwin
75 script:
76 - 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 +050077
78install:
79 - git clone https://github.com/VTest/VTest.git ../vtest
Tim Duesterhus88c63a62019-04-24 19:11:09 +050080 # Special flags due to: https://github.com/vtest/VTest/issues/12
81 - make -C ../vtest FLAGS="-O2 -s -Wall"
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050082 - scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1)
Tim Duesterhus88c63a62019-04-24 19:11:09 +050083
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050084script:
Ilya Shipitsin46166c22019-05-22 20:12:15 +050085 - if [ "${CC}" = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"; fi
86 - make -C contrib/wurfl
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050087 - 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 +050088 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"; fi
89 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${HOME}/opt/lib:${DYLD_LIBRARY_PATH:-}"; fi
Tim Duesterhus88c63a62019-04-24 19:11:09 +050090 - ./haproxy -vv
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050091 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
92 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050093 - env VTEST_PROGRAM=../vtest/vtest make reg-tests
Tim Duesterhus88c63a62019-04-24 19:11:09 +050094
95after_failure:
96 - |
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050097 for folder in ${TMPDIR}/*regtest*/vtc.*; do
Tim Duesterhus88c63a62019-04-24 19:11:09 +050098 cat $folder/INFO
99 cat $folder/LOG
100 done