BUILD: extend Travis CI config to support more platforms

This commit extends the Travis CI configuration to build HAProxy
with gcc on Linux, clang on Mac and cleans up the build flag
configuration to be easier extendable.

Note: At the moment HAProxy fails on Travis for configurations
on OS X
This commit is contained in:
Tim Duesterhus 2019-04-24 19:11:09 +05:00 committed by Willy Tarreau
parent 22d63a24d9
commit 88c63a6e55
1 changed files with 34 additions and 10 deletions

View File

@ -3,22 +3,46 @@ dist: xenial
language: c language: c
addons:
apt:
packages: [ liblua5.3-dev ]
matrix: matrix:
include: include:
# - os: linux - os: linux
# compiler: gcc compiler: gcc
# env: TARGET=linux2628 env: TARGET=linux2628 FLAGS=
- os: linux
compiler: gcc
env: TARGET=linux2628 FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_LUA=1 USE_OPENSSL=1"
- os: linux - os: linux
compiler: clang compiler: clang
env: TARGET=linux2628 USE_THREAD=1 USE_OPENSSL=1 USE_PCRE=1 USE_ZLIB=1 USE_GETADDRINFO=1 env: TARGET=linux2628 FLAGS=
# - os: osx - os: osx
# compiler: clang compiler: clang
# env: TARGET=osx SSL_LIB=/usr/local/opt/openssl/lib SSL_INC=/usr/local/opt/openssl/include TMPDIR=/var/tmp env: TARGET=generic FLAGS=
allow_failures:
- os: osx
install: install:
- git clone https://github.com/VTest/VTest.git ../vtest - git clone https://github.com/VTest/VTest.git ../vtest
- make -C ../vtest # Special flags due to: https://github.com/vtest/VTest/issues/12
- make -C ../vtest FLAGS="-O2 -s -Wall"
before_script:
# This is a fix for the super long TMPDIR on Mac making
# the unix socket path names exceed the maximum allowed
# length.
- sed -i'.original' '/TESTDIR=.*haregtests/s/haregtests-.*XXXXXX/regtest.XXX/' scripts/run-regtests.sh
script: script:
- make CC=$CC V=1 TARGET=$TARGET USE_THREAD=${USE_THREAD} USE_OPENSSL=${USE_OPENSSL} USE_PCRE=${USE_PCRE} USE_ZLIB=${USE_ZLIB} USE_GETADDRINFO=${USE_GETADDRINFO} - make CC=$CC V=1 TARGET=$TARGET $FLAGS
- make reg-tests PATH=${PATH}:${PWD}/../vtest VTEST_PROGRAM="../vtest/vtest -v" - ./haproxy -vv
- env VTEST_PROGRAM=../vtest/vtest make reg-tests
after_failure:
- |
for folder in ${TMPDIR:-/tmp}/*regtest*/vtc.*; do
cat $folder/INFO
cat $folder/LOG
done