Re: [PATCH] travis-ci: remove "allow failures", add ERR=1, modernize build-ssl.sh script

2020-02-12 Thread Willy Tarreau
Hi Ilya,

series now applied, thanks!
Willy



[PATCH] travis-ci: remove "allow failures", add ERR=1, modernize build-ssl.sh script

2020-02-11 Thread Илья Шипицин
Hello,

I split patch into separate patches.

cheers,
Ilya Shipitcin
From 17b0b5fae3afe6df42e938073ccf8d7a2105fbb7 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin 
Date: Tue, 11 Feb 2020 14:29:41 +0500
Subject: [PATCH 1/3] BUILD: travis-ci: no more allowed failures for
 openssl-1.0.2

since 23fb037 (which fixes #429) no need to allow failures
on openssl-1.0.2
---
 .travis.yml | 6 --
 1 file changed, 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a82c27327..1cce8db88 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -92,12 +92,6 @@ matrix:
 before_script:
   - git clone http://git.1wt.eu/git/libslz.git/
   - cd libslz && make && make PREFIX=${HOME}/opt install && cd ..
-  allow_failures:
-  - os: linux
-arch: ppc64le
-if: type == cron
-compiler: gcc
-env: TARGET=linux-glibc OPENSSL_VERSION=1.0.2u
 
 install:
   - git clone https://github.com/VTest/VTest.git ../vtest
-- 
2.24.1

From 80803044ad103fe3815f88eb4174c55914b5ac71 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin 
Date: Tue, 11 Feb 2020 14:31:13 +0500
Subject: [PATCH 2/3] BUILD: travis-ci: harden builds, add ERR=1 (warning ought
 to be errors)

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 1cce8db88..fd136c980 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -102,7 +102,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 -j3 CC=$CC V=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS -L$SSL_LIB -Wl,-rpath,$SSL_LIB" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS"
+  - make -j3 CC=$CC V=1 ERR=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS -L$SSL_LIB -Wl,-rpath,$SSL_LIB" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS"
   - ./haproxy -vv
   - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
   - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L haproxy; fi
-- 
2.24.1

From f850c0b44c52681ea94f0e42da2f0acf9baa3826 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin 
Date: Tue, 11 Feb 2020 14:36:23 +0500
Subject: [PATCH 3/3] BUILD: scripts/build-ssl.sh: use "uname" instead of
 ${TRAVIS_OS_NAME}

it is also useful for local builds, when ${TRAVIS_OS_NAME} is not set
---
 scripts/build-ssl.sh | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/scripts/build-ssl.sh b/scripts/build-ssl.sh
index 384438a22..60b876c5d 100755
--- a/scripts/build-ssl.sh
+++ b/scripts/build-ssl.sh
@@ -28,11 +28,14 @@ build_openssl_osx () {
 build_openssl () {
 if [ "$(cat ${HOME}/opt/.openssl-version)" != "${OPENSSL_VERSION}" ]; then
 tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz"
-if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
-build_openssl_osx
-elif [ "${TRAVIS_OS_NAME}" = "linux" ]; then
-build_openssl_linux
-fi
+	case `uname` in
+		'Darwin')
+			build_openssl_osx
+			;;
+		'Linux')
+			build_openssl_linux
+			;;
+	esac
 echo "${OPENSSL_VERSION}" > "${HOME}/opt/.openssl-version"
 fi
 }
-- 
2.24.1