blob: cf227b3a5a255996815d84b4c1a1a158a96ae4b7 [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 Shipitsin2f9802b2020-04-03 00:07:17 +050019 - DEBUG_OPTIONS="DEBUG_STRICT=1"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050020
Tim Duesterhus88c63a62019-04-24 19:11:09 +050021addons:
22 apt:
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050023 update: true
Ilya Shipitsinaaa34ea2020-06-21 16:39:30 +050024 packages: [ liblua5.3-dev, libsystemd-dev, libpcre2-dev, clang-9, socat, ninja-build ]
Tim Duesterhus88c63a62019-04-24 19:11:09 +050025
Ilya Shipitsind8db4e62019-05-07 01:42:43 +050026cache:
27 directories:
28 - download-cache
29 - ${HOME}/opt
30
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050031matrix:
32 include:
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050033 - os: linux
34 arch: ppc64le
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050035 if: type == cron
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050036 compiler: gcc
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050037 env: TARGET=linux-glibc OPENSSL_VERSION=1.0.2u
38 - os: linux
39 arch: amd64
Ilya Shipitsinceb060e2020-03-18 21:27:39 +050040 if: type == push
Ilya Shipitsin9bf2a1b2020-01-19 12:14:02 +050041 compiler: clang
Ilya Shipitsin197af012020-04-03 00:20:46 +050042 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1f CC=clang-9
Ilya Shipitsin49fecd92020-05-07 20:57:26 +050043 - os: linux
Martin Tzvetanov Grigorov5eb5e252020-05-15 23:34:46 +050044 # The ARM64 build uses openssl and libssl-dev from Ubuntu repository. They come preinstalled by TravisCI!
Ilya Shipitsin49fecd92020-05-07 20:57:26 +050045 arch: arm64
46 if: type == push
47 compiler: clang
Martin Tzvetanov Grigorov5eb5e252020-05-15 23:34:46 +050048 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1f CC=clang-9 SSL_LIB=/usr/lib SSL_INC=/usr/include
49 install:
50 - git clone https://github.com/VTest/VTest.git ../vtest
51 # Special flags due to: https://github.com/vtest/VTest/issues/12
52 - make -C ../vtest FLAGS="-O2 -s -Wall"
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050053 - os: linux
Willy Tarreaud7263862020-03-13 04:10:31 +010054 arch: s390x
Ilya Shipitsinceb060e2020-03-18 21:27:39 +050055 if: type == push
Willy Tarreaud7263862020-03-13 04:10:31 +010056 compiler: gcc
Ilya Shipitsin197af012020-04-03 00:20:46 +050057 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1f
Willy Tarreaud7263862020-03-13 04:10:31 +010058 - os: linux
Ilya Shipitsin1b772622019-08-02 22:59:03 +050059 if: type == cron
60 compiler: clang
Ilya Shipitsin197af012020-04-03 00:20:46 +050061 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.1f 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 +050062 script:
63 - |
64 if [ ! -z ${COVERITY_SCAN_TOKEN+x} ]; then
65 make -C contrib/wurfl
66 curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true
67 fi
68 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050069 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050070 compiler: clang
Ilya Shipitsin663825e2020-01-24 11:36:41 +050071 env: TARGET=linux-glibc OPENSSL_VERSION=1.1.0l FIFTYONEDEGREES_SRC="contrib/51d/src/trie" CC=clang-9
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050072 - os: linux
Ilya Shipitsinceb060e2020-03-18 21:27:39 +050073 if: type == push
Ilya Shipitsin46166c22019-05-22 20:12:15 +050074 compiler: clang
Ilya Shipitsinb7faead2020-05-09 21:36:04 +050075 env: TARGET=linux-glibc LIBRESSL_VERSION=3.1.1 CC=clang-9
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050076 - os: linux
Ilya Shipitsin2f9802b2020-04-03 00:07:17 +050077 env: DEBUG_OPTIONS=""
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050078 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050079 compiler: clang
Ilya Shipitsinb7faead2020-05-09 21:36:04 +050080 env: TARGET=linux-glibc LIBRESSL_VERSION=3.0.2 CC=clang-9
Ilya Shipitsin054a5b82019-05-03 14:31:20 +050081 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050082 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050083 compiler: clang
Ilya Shipitsinb7faead2020-05-09 21:36:04 +050084 env: TARGET=linux-glibc LIBRESSL_VERSION=2.9.2 EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" CC=clang-9
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050085 - os: linux
Ilya Shipitsin6f9fe362019-08-19 21:32:53 +050086 if: type == cron
Ilya Shipitsin46166c22019-05-22 20:12:15 +050087 compiler: clang
Willy Tarreau0df09822020-03-16 08:10:56 +010088 env: TARGET=linux-glibc BORINGSSL=yes
Ilya Shipitsin35d20af2019-05-09 01:15:59 +050089 - os: linux
Ilya Shipitsinceb060e2020-03-18 21:27:39 +050090 if: type == push
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +050091 compiler: clang
Ilya Shipitsin663825e2020-01-24 11:36:41 +050092 env: TARGET=linux-glibc FLAGS= CC=clang-9
Tim Duesterhus88c63a62019-04-24 19:11:09 +050093 - os: osx
Ilya Shipitsine0e6aa52020-07-11 21:51:37 +050094 osx_image: xcode12
Ilya Shipitsinceb060e2020-03-18 21:27:39 +050095 if: type == push
Tim Duesterhus88c63a62019-04-24 19:11:09 +050096 compiler: clang
Ilya Shipitsine0e6aa52020-07-11 21:51:37 +050097 before_script:
98 - echo 'brew "socat"' > brew.bundle
99 - brew bundle --file=brew.bundle
Ilya Shipitsin197af012020-04-03 00:20:46 +0500100 env: TARGET=osx FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1f
Ilya Shipitsina6687612019-09-19 23:32:30 +0500101 - os: linux
102 if: type == cron
103 compiler: clang
Ilya Shipitsin663825e2020-01-24 11:36:41 +0500104 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 +0500105 before_script:
Ilya Shipitsin13dd4512020-05-19 01:47:07 +0500106 - git clone https://github.com/wtarreau/libslz
Ilya Shipitsina6687612019-09-19 23:32:30 +0500107 - cd libslz && make && make PREFIX=${HOME}/opt install && cd ..
Ilya Shipitsin49fecd92020-05-07 20:57:26 +0500108 allow_failures:
109 - os: linux
110 arch: arm64
111 if: type == push
112 compiler: clang
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +0500113
114install:
115 - git clone https://github.com/VTest/VTest.git ../vtest
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500116 # Special flags due to: https://github.com/vtest/VTest/issues/12
117 - make -C ../vtest FLAGS="-O2 -s -Wall"
Martin Tzvetanov Grigorov5eb5e252020-05-15 23:34:46 +0500118 - travis_wait bash -c 'scripts/build-ssl.sh >build-ssl.log 2>&1' || (cat build-ssl.log && exit 1)
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500119
Ilya Shipitsin8a9d55b2019-04-17 12:41:13 +0500120script:
Willy Tarreau98ebeca2020-03-18 09:35:58 +0100121 - 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 +0500122 - make -C contrib/wurfl
Ilya Shipitsin8469bed2020-06-14 01:08:37 +0500123 - make -j3 CC=$CC CPU_CFLAGS.generic="-O1" V=1 ERR=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" ADDLIB="-Wl,-rpath,$SSL_LIB" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS" $DEBUG_OPTIONS
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500124 - ./haproxy -vv
Ilya Shipitsin054a5b82019-05-03 14:31:20 +0500125 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
126 - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
Willy Tarreaud78cf0f2020-01-24 17:37:35 +0100127 - make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500128
129after_failure:
130 - |
Ilya Shipitsinb9ae7642019-05-10 15:38:52 +0500131 for folder in ${TMPDIR}/*regtest*/vtc.*; do
Tim Duesterhus88c63a62019-04-24 19:11:09 +0500132 cat $folder/INFO
133 cat $folder/LOG
134 done