blob: f3fe008fc5767bfdd2d1b189310732ea0a0766e8 [file] [log] [blame]
Willy Tarreaua3956aa2019-10-17 06:53:55 +02001# build status appears on https://travis-ci.com/haproxy/haproxy
2
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +05003sudo: required
4dist: xenial
5
6language: c
7
Willy Tarreaua3956aa2019-10-17 06:53:55 +02008branches:
9 only:
10 - master
11 - next
12
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050013env:
14 global:
Ilya Shipitsin862d6932019-06-16 01:19:27 +050015 - 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 +050016 - SSL_LIB=${HOME}/opt/lib
17 - SSL_INC=${HOME}/opt/include
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050018 - TMPDIR=/tmp
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050019 - FIFTYONEDEGREES_SRC="contrib/51d/src/pattern"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050020
Tim Duesterhus88c63a62019-04-24 19:11:09 +050021addons:
22 apt:
Ilya Shipitsina6687612019-09-19 23:32:30 +050023 packages: [ liblua5.3-dev, libsystemd-dev, libpcre2-dev ]
Tim Duesterhus88c63a62019-04-24 19:11:09 +050024
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050025cache:
26 directories:
27 - download-cache
28 - ${HOME}/opt
29
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050030matrix:
31 include:
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050032 - os: linux-ppc64le
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050033 if: type == cron
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050034 compiler: gcc
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050035 env: TARGET=linux-glibc OPENSSL_VERSION=1.0.2r LABEL="linux-ppc64le"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050036 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050037 if: type != cron
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.1.1c
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050040 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050041 if: type == cron
42 compiler: clang
43 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"
44 script:
45 - |
46 if [ ! -z ${COVERITY_SCAN_TOKEN+x} ]; then
47 make -C contrib/wurfl
48 curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true
49 fi
50 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050051 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050052 compiler: clang
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050053 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.0j FIFTYONEDEGREES_SRC="contrib/51d/src/trie"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050054 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050055 if: type != cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050056 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020057 env: TARGET=linux-glibc LIBRESSL_VERSION=2.9.2
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050058 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050059 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050060 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020061 env: TARGET=linux-glibc LIBRESSL_VERSION=2.8.3
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050062 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050063 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050064 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020065 env: TARGET=linux-glibc LIBRESSL_VERSION=2.7.5 EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050066 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050067 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050068 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020069 env: TARGET=linux-glibc BORINGSSL=yes
Ilya Shipitsin35d20af2019-05-09 01:15:59 +050070 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050071 if: type != cron
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050072 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020073 env: TARGET=linux-glibc FLAGS=
Tim Duesterhus88c63a62019-04-24 19:11:09 +050074 - os: osx
Ilya Shipitsin1b772622019-08-02 22:59:03 +050075 if: type != cron
Tim Duesterhus88c63a62019-04-24 19:11:09 +050076 compiler: clang
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050077 env: TARGET=osx FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1c
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050078 - os: windows
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050079 if: type == cron
Ilya Shipitsina088d3d2019-06-05 02:16:51 +050080 install:
81 - choco install bash make libssl-devel cygwin-devel gcc-core libgcc1 binutils lua-devel libpcre-devel zlib-devel --source cygwin
82 script:
83 - 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 +050084 - os: linux
85 if: type == cron
86 compiler: clang
87 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"
88 before_script:
89 - git clone http://git.1wt.eu/git/libslz.git/
90 - cd libslz && make && make PREFIX=${HOME}/opt install && cd ..
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050091
92install:
93 - git clone https://github.com/VTest/VTest.git ../vtest
Tim Duesterhus88c63a62019-04-24 19:11:09 +050094 # Special flags due to: https://github.com/vtest/VTest/issues/12
95 - make -C ../vtest FLAGS="-O2 -s -Wall"
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050096 - scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1)
Tim Duesterhus88c63a62019-04-24 19:11:09 +050097
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050098script:
Ilya Shipitsin46166c22019-05-22 20:12:15 +050099 - make -C contrib/wurfl
Ilya Shipitsinb41aded2019-06-13 20:00:05 +0500100 - 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 +0500101 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"; fi
102 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${HOME}/opt/lib:${DYLD_LIBRARY_PATH:-}"; fi
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500103 - ./haproxy -vv
Ilya Shipitsin054a5b82019-05-03 14:31:20 +0500104 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
105 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +0500106 - env VTEST_PROGRAM=../vtest/vtest make reg-tests
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500107
108after_failure:
109 - |
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +0500110 for folder in ${TMPDIR}/*regtest*/vtc.*; do
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500111 cat $folder/INFO
112 cat $folder/LOG
113 done