blob: d263cf75a09dbeb21a759b3f23d8e86b512febd9 [file] [log] [blame]
Willy Tarreaua3956aa2019-10-17 06:53:55 +02001# build status appears on https://travis-ci.com/haproxy/haproxy
2
Ilya Shipitsin632cae22019-10-27 20:16:29 +05003dist: bionic
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +05004
5language: c
6
Willy Tarreaua3956aa2019-10-17 06:53:55 +02007branches:
8 only:
9 - master
10 - next
11
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050012env:
13 global:
Ilya Shipitsin862d6932019-06-16 01:19:27 +050014 - 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 +050015 - SSL_LIB=${HOME}/opt/lib
16 - SSL_INC=${HOME}/opt/include
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +050017 - TMPDIR=/tmp
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050018 - FIFTYONEDEGREES_SRC="contrib/51d/src/pattern"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050019
Tim Duesterhus88c63a62019-04-24 19:11:09 +050020addons:
21 apt:
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050022 update: true
23 packages: [ liblua5.3-dev, libsystemd-dev, libpcre2-dev, socat ]
24 homebrew:
25 update: true
26 packages: [ socat ]
Tim Duesterhus88c63a62019-04-24 19:11:09 +050027
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050028cache:
29 directories:
30 - download-cache
31 - ${HOME}/opt
32
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050033matrix:
34 include:
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050035 - os: linux
36 arch: ppc64le
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050037 if: type == cron
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050038 compiler: gcc
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050039 env: TARGET=linux-glibc OPENSSL_VERSION=1.0.2u
40 - os: linux
41 arch: amd64
42 if: type != cron
43 compiler: clang
44 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1d
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050045 - os: linux
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050046 arch: arm64
Ilya Shipitsin1b772622019-08-02 22:59:03 +050047 if: type != cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050048 compiler: clang
Ilya Shipitsin632cae22019-10-27 20:16:29 +050049 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1d
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050050 - os: linux
Ilya Shipitsin3380a4e2020-02-19 23:47:56 +050051 arch: s390x
52 if: type != cron
53 compiler: gcc
54 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1d
55 before_script:
56 - rm reg-tests/seamless-reload/abns_socket.vtc # please, see https://github.com/haproxy/haproxy/issues/504
57 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050058 if: type == cron
59 compiler: clang
Ilya Shipitsin632cae22019-10-27 20:16:29 +050060 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1d 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"
Ilya Shipitsin1b772622019-08-02 22:59:03 +050061 script:
62 - |
63 if [ ! -z ${COVERITY_SCAN_TOKEN+x} ]; then
64 make -C contrib/wurfl
65 curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true
66 fi
67 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050068 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050069 compiler: clang
Ilya Shipitsin632cae22019-10-27 20:16:29 +050070 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.0l FIFTYONEDEGREES_SRC="contrib/51d/src/trie"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050071 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050072 if: type != cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050073 compiler: clang
Ilya Shipitsin632cae22019-10-27 20:16:29 +050074 env: TARGET=linux-glibc LIBRESSL_VERSION=3.0.2
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050075 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050076 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050077 compiler: clang
Ilya Shipitsin632cae22019-10-27 20:16:29 +050078 env: TARGET=linux-glibc LIBRESSL_VERSION=2.9.2
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050079 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050080 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050081 compiler: clang
Ilya Shipitsin632cae22019-10-27 20:16:29 +050082 env: TARGET=linux-glibc LIBRESSL_VERSION=2.8.3 EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050083 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050084 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050085 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020086 env: TARGET=linux-glibc BORINGSSL=yes
Ilya Shipitsin35d20af2019-05-09 01:15:59 +050087 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050088 if: type != cron
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050089 compiler: clang
Willy Tarreauc26b4672019-06-14 18:32:34 +020090 env: TARGET=linux-glibc FLAGS=
Tim Duesterhus88c63a62019-04-24 19:11:09 +050091 - os: osx
Ilya Shipitsin1b772622019-08-02 22:59:03 +050092 if: type != cron
Tim Duesterhus88c63a62019-04-24 19:11:09 +050093 compiler: clang
Ilya Shipitsin632cae22019-10-27 20:16:29 +050094 env: TARGET=osx FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1d
Ilya Shipitsina6687612019-09-19 23:32:30 +050095 - os: linux
96 if: type == cron
97 compiler: clang
98 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"
99 before_script:
100 - git clone http://git.1wt.eu/git/libslz.git/
101 - cd libslz && make && make PREFIX=${HOME}/opt install && cd ..
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +0500102
103install:
104 - git clone https://github.com/VTest/VTest.git ../vtest
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500105 # Special flags due to: https://github.com/vtest/VTest/issues/12
106 - make -C ../vtest FLAGS="-O2 -s -Wall"
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +0500107 - travis_wait scripts/build-ssl.sh > build-ssl.log 2>&1 || (cat build-ssl.log && exit 1)
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500108
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +0500109script:
Ilya Shipitsin7aed6ef2019-12-21 18:10:28 +0500110 - if [ "$CC" = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"; fi
Ilya Shipitsin46166c22019-05-22 20:12:15 +0500111 - make -C contrib/wurfl
Ilya Shipitsin1f555da2020-02-11 14:31:13 +0500112 - make -j3 CC=$CC V=1 ERR=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS -L$SSL_LIB -Wl,-rpath,$SSL_LIB" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS"
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500113 - ./haproxy -vv
Ilya Shipitsin054a5b82019-05-03 14:31:20 +0500114 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
115 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
Willy Tarreaud78cf0f2020-01-24 17:37:35 +0100116 - make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500117
118after_failure:
119 - |
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +0500120 for folder in ${TMPDIR}/*regtest*/vtc.*; do
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500121 cat $folder/INFO
122 cat $folder/LOG
123 done