blob: 1057ccc37e9e3de8fbe033893ef7a3dfd7932c7c [file] [log] [blame]
Willy Tarreaua3956aa2019-10-17 06:53:55 +02001# build status appears on https://travis-ci.com/haproxy/haproxy
2
Ilya Shipitsinb1faf482020-10-21 15:12:29 +05003dist: focal
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 Shipitsinb9ae7642019-05-10 15:38:52 +050015 - TMPDIR=/tmp
Ilya Shipitsinb41aded2019-06-13 20:00:05 +050016 - FIFTYONEDEGREES_SRC="contrib/51d/src/pattern"
Ilya Shipitsin2f9802b2020-04-03 00:07:17 +050017 - DEBUG_OPTIONS="DEBUG_STRICT=1"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050018
Tim Duesterhus88c63a62019-04-24 19:11:09 +050019addons:
20 apt:
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050021 update: true
Ilya Shipitsinb1faf482020-10-21 15:12:29 +050022 packages: [ liblua5.3-dev, libsystemd-dev, libpcre2-dev, clang-9, socat, ninja-build, libpcre3-dev ]
Tim Duesterhus88c63a62019-04-24 19:11:09 +050023
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050024cache:
25 directories:
26 - download-cache
27 - ${HOME}/opt
28
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050029matrix:
30 include:
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050031 - os: linux
32 arch: ppc64le
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050033 if: type == cron
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050034 compiler: gcc
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050035 env: TARGET=linux-glibc OPENSSL_VERSION=1.0.2u
Ilya Shipitsin90ff5902020-07-30 01:47:55 +050036 name: openssl-1.0.2
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050037 - os: linux
Ilya Shipitsin49fecd92020-05-07 20:57:26 +050038 arch: arm64
39 if: type == push
40 compiler: clang
Ilya Shipitsin73b520b2020-07-30 01:39:24 +050041 env: TARGET=linux-glibc CC=clang-9
Ilya Shipitsin90ff5902020-07-30 01:47:55 +050042 name: openssl-1.1.1
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050043 - os: linux
Willy Tarreaud7263862020-03-13 04:10:31 +010044 arch: s390x
Ilya Shipitsinceb060e2020-03-18 21:27:39 +050045 if: type == push
Willy Tarreaud7263862020-03-13 04:10:31 +010046 compiler: gcc
Ilya Shipitsin90ff5902020-07-30 01:47:55 +050047 env: TARGET=linux-glibc
48 name: openssl-1.1.1
Willy Tarreaud7263862020-03-13 04:10:31 +010049 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050050 if: type == cron
51 compiler: clang
Ilya Shipitsin7aaadf52020-10-09 03:05:11 +050052 env: TARGET=linux-glibc COVERITY_SCAN_PROJECT_NAME="Haproxy" COVERITY_SCAN_BRANCH_PATTERN="*" COVERITY_SCAN_NOTIFICATION_EMAIL="chipitsine@gmail.com" COVERITY_SCAN_BUILD_COMMAND="make CC=clang DEFINE=-DDEBUG_USE_ABORT TARGET=$TARGET $FLAGS 51DEGREES_SRC=$FIFTYONEDEGREES_SRC DEBUG_STRICT=1"
Ilya Shipitsin1b772622019-08-02 22:59:03 +050053 script:
54 - |
55 if [ ! -z ${COVERITY_SCAN_TOKEN+x} ]; then
56 make -C contrib/wurfl
57 curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true
58 fi
Ilya Shipitsind6817022020-07-31 02:05:55 +050059 name: Coverity scan | openssl-1.1.1
Ilya Shipitsin1b772622019-08-02 22:59:03 +050060 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050061 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050062 compiler: clang
Ilya Shipitsin663825e2020-01-24 11:36:41 +050063 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.0l FIFTYONEDEGREES_SRC="contrib/51d/src/trie" CC=clang-9
Ilya Shipitsin90ff5902020-07-30 01:47:55 +050064 name: openssl-1.1.1 | 51d trie
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050065 - os: linux
Ilya Shipitsinceb060e2020-03-18 21:27:39 +050066 if: type == push
Ilya Shipitsin46166c22019-05-22 20:12:15 +050067 compiler: clang
Ilya Shipitsinb7faead2020-05-09 21:36:04 +050068 env: TARGET=linux-glibc LIBRESSL_VERSION=3.1.1 CC=clang-9
Ilya Shipitsin90ff5902020-07-30 01:47:55 +050069 name: libressl-3.1.1
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050070 - os: linux
Ilya Shipitsin2f9802b2020-04-03 00:07:17 +050071 env: DEBUG_OPTIONS=""
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050072 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050073 compiler: clang
Ilya Shipitsinb7faead2020-05-09 21:36:04 +050074 env: TARGET=linux-glibc LIBRESSL_VERSION=3.0.2 CC=clang-9
Ilya Shipitsin90ff5902020-07-30 01:47:55 +050075 name: libressl-3.0.2 | ERR=
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050076 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050077 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050078 compiler: clang
Ilya Shipitsinb7faead2020-05-09 21:36:04 +050079 env: TARGET=linux-glibc LIBRESSL_VERSION=2.9.2 EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" CC=clang-9
Ilya Shipitsin90ff5902020-07-30 01:47:55 +050080 name: libressl-2.9.2 | prometheus-exporter
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050081 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050082 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050083 compiler: clang
Willy Tarreau0df09822020-03-16 08:10:56 +010084 env: TARGET=linux-glibc BORINGSSL=yes
Ilya Shipitsin90ff5902020-07-30 01:47:55 +050085 name: boringssl
Ilya Shipitsin35d20af2019-05-09 01:15:59 +050086 - os: linux
Ilya Shipitsinceb060e2020-03-18 21:27:39 +050087 if: type == push
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050088 compiler: clang
Ilya Shipitsin663825e2020-01-24 11:36:41 +050089 env: TARGET=linux-glibc FLAGS= CC=clang-9
Ilya Shipitsin90ff5902020-07-30 01:47:55 +050090 name: FLAGS=
Ilya Shipitsina6687612019-09-19 23:32:30 +050091 - os: linux
92 if: type == cron
93 compiler: clang
Ilya Shipitsin663825e2020-01-24 11:36:41 +050094 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" CC=clang-9
Ilya Shipitsina6687612019-09-19 23:32:30 +050095 before_script:
Ilya Shipitsin13dd4512020-05-19 01:47:07 +050096 - git clone https://github.com/wtarreau/libslz
Ilya Shipitsina6687612019-09-19 23:32:30 +050097 - cd libslz && make && make PREFIX=${HOME}/opt install && cd ..
Ilya Shipitsin61d85b02020-07-31 02:08:13 +050098 - export SLZ_INC=${HOME}/opt/include SLZ_LIB=${HOME}/opt/lib
99 - export ADDLIB="-Wl,-rpath,$SLZ_LIB"
Ilya Shipitsin90ff5902020-07-30 01:47:55 +0500100 name: openssl-1.1.1 | slz | pcre2
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +0500101
102install:
103 - git clone https://github.com/VTest/VTest.git ../vtest
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500104 # Special flags due to: https://github.com/vtest/VTest/issues/12
105 - make -C ../vtest FLAGS="-O2 -s -Wall"
Ilya Shipitsin73b520b2020-07-30 01:39:24 +0500106 - |
107 if [ ! -z ${OPENSSL_VERSION+x} ] || [ ! -z ${LIBRESSL_VERSION+x} ] || [ ! -z ${BORINGSSL+x} ]; then
108 travis_wait bash -c 'scripts/build-ssl.sh >build-ssl.log 2>&1' || (cat build-ssl.log && exit 1)
109 export SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include
Ilya Shipitsin61d85b02020-07-31 02:08:13 +0500110 export ADDLIB="-Wl,-rpath,$SSL_LIB"
Ilya Shipitsin73b520b2020-07-30 01:39:24 +0500111 fi
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500112
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +0500113script:
Ilya Shipitsine1c0e692020-08-27 21:00:09 +0500114 - if [ "${CC%-*}" = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ASAN_OPTIONS="log_path=asan.log"; fi
Ilya Shipitsin46166c22019-05-22 20:12:15 +0500115 - make -C contrib/wurfl
Ilya Shipitsinbab67522020-08-04 15:39:41 +0500116 - make -j3 CC=$CC CPU_CFLAGS.generic="-O1" V=1 ERR=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" ADDLIB="$ADDLIB" SSL_LIB="$SSL_LIB" SSL_INC="$SSL_INC" SLZ_LIB="$SLZ_LIB" SLZ_INC="$SLZ_INC" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS" $DEBUG_OPTIONS
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500117 - ./haproxy -vv
Ilya Shipitsin054a5b82019-05-03 14:31:20 +0500118 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
119 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
Willy Tarreaud78cf0f2020-01-24 17:37:35 +0100120 - make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
Ilya Shipitsine1c0e692020-08-27 21:00:09 +0500121 - |
122 if ls asan.log* 1>/dev/null 2>&1; then
123 cat asan.log*
124 exit 1
125 fi
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500126
127after_failure:
128 - |
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +0500129 for folder in ${TMPDIR}/*regtest*/vtc.*; do
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500130 cat $folder/INFO
131 cat $folder/LOG
132 done