BUILD: travis-ci improvements

full list:

update LibreSSL to 2.9.2
speed up build by using "make -j3"
cache BoringSSL checkout
build prometeus exporter
add basic cygwin build
add USE_TFO=1, USE_SYSTEMD=1 to linux builds
This commit is contained in:
Ilya Shipitsin 2019-06-05 02:16:51 +05:00 committed by Willy Tarreau
parent 839af57c85
commit a088d3dea9
2 changed files with 25 additions and 8 deletions

View File

@ -5,14 +5,14 @@ language: c
env:
global:
- FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_GETADDRINFO=1 USE_WURFL=1 WURFL_INC=contrib/wurfl WURFL_LIB=contrib/wurfl USE_DEVICEATLAS=1 DEVICEATLAS_SRC=contrib/deviceatlas"
- FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_GETADDRINFO=1 USE_TFO=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=contrib/wurfl WURFL_LIB=contrib/wurfl USE_DEVICEATLAS=1 DEVICEATLAS_SRC=contrib/deviceatlas"
- SSL_LIB=${HOME}/opt/lib
- SSL_INC=${HOME}/opt/include
- TMPDIR=/tmp
addons:
apt:
packages: [ liblua5.3-dev ]
packages: [ liblua5.3-dev, libsystemd-dev ]
cache:
directories:
@ -38,13 +38,13 @@ matrix:
env: TARGET=linux2628 OPENSSL_VERSION=1.0.2r
- os: linux
compiler: clang
env: TARGET=linux2628 LIBRESSL_VERSION=2.9.1
env: TARGET=linux2628 LIBRESSL_VERSION=2.9.2
- os: linux
compiler: clang
env: TARGET=linux2628 LIBRESSL_VERSION=2.8.3
- os: linux
compiler: clang
env: TARGET=linux2628 LIBRESSL_VERSION=2.7.5
env: TARGET=linux2628 LIBRESSL_VERSION=2.7.5 EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
- os: linux
compiler: clang
env: TARGET=linux2628 BORINGSSL=yes
@ -54,6 +54,11 @@ matrix:
- os: osx
compiler: clang
env: TARGET=osx FLAGS="USE_OPENSSL=1" OPENSSL_VERSION=1.1.1b
- os: windows
install:
- choco install bash make libssl-devel cygwin-devel gcc-core libgcc1 binutils lua-devel libpcre-devel zlib-devel --source cygwin
script:
- 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'
install:
- git clone https://github.com/VTest/VTest.git ../vtest
@ -64,7 +69,7 @@ install:
script:
- if [ "${CC}" = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"; fi
- make -C contrib/wurfl
- make CC=$CC V=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS"
- make -j3 CC=$CC V=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" EXTRA_OBJS="$EXTRA_OBJS"
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export LD_LIBRARY_PATH="${HOME}/opt/lib:${LD_LIBRARY_PATH:-}"; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export DYLD_LIBRARY_PATH="${HOME}/opt/lib:${DYLD_LIBRARY_PATH:-}"; fi
- ./haproxy -vv

View File

@ -56,6 +56,17 @@ build_libressl () {
fi
}
download_boringssl () {
if [ ! -d "download-cache/boringssl" ]; then
git clone --depth=1 https://boringssl.googlesource.com/boringssl download-cache/boringssl
else
(
cd download-cache/boringssl
git pull
)
fi
}
if [ ! -z ${LIBRESSL_VERSION+x} ]; then
download_libressl
build_libressl
@ -68,8 +79,9 @@ fi
if [ ! -z ${BORINGSSL+x} ]; then
(
git clone --depth=1 https://boringssl.googlesource.com/boringssl
cd boringssl
download_boringssl
cd download-cache/boringssl
if [ -d build ]; then rm -rf build; fi
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_SHARED_LIBS=1 ..
@ -82,7 +94,7 @@ if [ ! -z ${BORINGSSL+x} ]; then
cp crypto/libcrypto.so ssl/libssl.so ${SSL_LIB}
mkdir -p ${SSL_INC}
mv ../include/* ${SSL_INC}
cp -r ../include/* ${SSL_INC}
)
fi