Skip to content

Commit f56f0ad

Browse files
committed
Improved ci build failure detection
1 parent 9201083 commit f56f0ad

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

tools/bootstrap-librdkafka.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
# Downloads, builds and installs librdkafka into <install-dir>
55
#
66

7-
set -e
7+
if [[ $1 == "--require-ssl" ]]; then
8+
REQUIRE_SSL=1
9+
shift
10+
fi
811

912
VERSION=$1
1013
PREFIXDIR=$2
1114

15+
set -e
16+
1217
if [[ -z "$VERSION" ]]; then
13-
echo "Usage: $0 <librdkafka-version> [<install-dir>]" 1>&2
18+
echo "Usage: $0 --require-ssl <librdkafka-version> [<install-dir>]" 1>&2
1419
exit 1
1520
fi
1621

@@ -32,6 +37,12 @@ curl -L "https://github.com/edenhill/librdkafka/archive/${VERSION}.tar.gz" | \
3237
./configure --clean
3338
make clean
3439
./configure --prefix="$PREFIXDIR"
40+
41+
if [[ $REQUIRE_SSL == 1 ]]; then
42+
grep '^#define WITH_SSL 2$' config.h || \
43+
(echo "ERROR: OpenSSL support required" ; cat config.log ; exit 1)
44+
fi
45+
3546
make -j
3647
make install
3748
popd

tools/build-openssl.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ if [[ -z $PREFIX ]]; then
1414
fi
1515

1616
set -ex
17+
set -o pipefail
1718

1819
echo "# Building OpenSSL ${OPENSSL_VERSION}"
1920

20-
2121
if ! grep -q "^VERSION=${OPENSSL_VERSION}$" build-openssl/Makefile ; then
2222
echo "No usable build-openssl directory: downloading ${OPENSSL_VERSION}"
2323
rm -rf build-openssl
@@ -32,7 +32,14 @@ fi
3232

3333
./config --prefix=${PREFIX} zlib no-krb5 zlib shared
3434
echo "## building openssl"
35-
time make -j 2>&1 | tail -20
35+
if ! time make -j 2>&1 | tail -20 ; then
36+
echo "## Make failed, cleaning up and retrying"
37+
time make clean 2>&1 | tail -20
38+
rm -f test/PASSED
39+
echo "## building openssl (retry)"
40+
time make -j 2>&1 | tail -20 ; then
41+
fi
42+
3643
if [[ ! -f test/PASSED ]]; then
3744
echo "## testing openssl"
3845
time make test 2>&1 | tail -20

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy