]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: travis-ci improvements
authorIlya Shipitsin <chipitsine@gmail.com>
Tue, 4 Jun 2019 21:16:51 +0000 (02:16 +0500)
committerWilly Tarreau <w@1wt.eu>
Wed, 5 Jun 2019 08:02:42 +0000 (10:02 +0200)
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

.travis.yml
scripts/build-ssl.sh

index e548c51544a478da0285963646092dc70a997825..032ee13cc401439c5d6c03a379c1988676fa89a4 100644 (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
index 812e4eb0ebaaefb4c8aaca1e8a41b0105a4c305e..cec81e04a3b096e6dbdf6dc098ab50a3d9e17e36 100755 (executable)
@@ -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