blob: 879a676ae7747bca72840b9b2682573507a8793c [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 Shipitsina6687612019-09-19 23:32:30 +050016 packages: [ liblua5.3-dev, libsystemd-dev, libpcre2-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 Shipitsina6687612019-09-19 23:32:30 +050077 - os: linux
78 if: type == cron
79 compiler: clang
80 env: TARGET=linux-glibc FLAGS="USE_SLZ=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=contrib/wurfl WURFL_LIB=contrib/wurfl USE_51DEGREES=1"
81 before_script:
82 - git clone http://git.1wt.eu/git/libslz.git/
83 - cd libslz && make && make PREFIX=${HOME}/opt install && cd ..
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050084
85install:
86 - git clone https://github.com/VTest/VTest.git ../vtest
Tim Duesterhus88c63a62019-04-24 19:11:09 +050087 # Special flags due to: https://github.com/vtest/VTest/issues/12
88 - make -C ../vtest FLAGS="-O2 -s -Wall"
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050089 - scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1)
Tim Duesterhus88c63a62019-04-24 19:11:09 +050090
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050091script:
Ilya Shipitsin46166c22019-05-22 20:12:15 +050092 - make -C contrib/wurfl
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050093 - 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 +050094 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"; fi
95 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${HOME}/opt/lib:${DYLD_LIBRARY_PATH:-}"; fi
Tim Duesterhus88c63a62019-04-24 19:11:09 +050096 - ./haproxy -vv
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050097 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
98 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050099 - env VTEST_PROGRAM=../vtest/vtest make reg-tests
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500100
101after_failure:
102 - |
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +0500103 for folder in ${TMPDIR}/*regtest*/vtc.*; do
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500104 cat $folder/INFO
105 cat $folder/LOG
106 done