Skip to content

Commit d25079a

Browse files
author
MarcoFalke
committed
Merge #13779: travis: improve readability of travis.yml and log outputs
f98146d use travis:fold in test script steps (Julian Fleischer) 9730d3a make .travis/yml a bit more readable (Julian Fleischer) Pull request description: This PR contains two commits which * make the travis.yml file a bit more readable by splitting the environment variables over lines (it's a little bit more verbose but way easier to compare across forks or visually grasp in the first place), * use `travis:fold` to fold the `autogen`, `configure`, `make`, and so forth, steps. The `END_FOLD` shell function preserves the exit code of the statement right before. Tree-SHA512: 7aff86e72008093f46d6ec7afa735f01e40c18f1efe55867d6ff4039191986c0fa8d4136cd53adb34e29f0f40e30c37d1a83615aea3f8438c20ec3b1c2910295
2 parents 8284f1d + f98146d commit d25079a

File tree

1 file changed

+65
-15
lines changed

1 file changed

+65
-15
lines changed

.travis.yml

Lines changed: 65 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,74 @@ env:
2727
- DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache"
2828
matrix:
2929
# ARM
30-
- HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
30+
- >-
31+
HOST=arm-linux-gnueabihf
32+
PACKAGES="g++-arm-linux-gnueabihf"
33+
DEP_OPTS="NO_QT=1"
34+
GOAL="install"
35+
BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
3136
# Win32
32-
- HOST=i686-w64-mingw32 DPKG_ADD_ARCH="i386" DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports"
37+
- >-
38+
HOST=i686-w64-mingw32
39+
DPKG_ADD_ARCH="i386"
40+
DEP_OPTS="NO_QT=1"
41+
PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32"
42+
RUN_TESTS=true
43+
GOAL="install"
44+
BITCOIN_CONFIG="--enable-reduce-exports"
3345
# Win64
34-
- HOST=x86_64-w64-mingw32 DEP_OPTS="NO_QT=1" PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-reduce-exports"
46+
- >-
47+
HOST=x86_64-w64-mingw32
48+
DEP_OPTS="NO_QT=1"
49+
PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
50+
RUN_TESTS=true
51+
GOAL="install"
52+
BITCOIN_CONFIG="--enable-reduce-exports"
3553
# 32-bit + dash
36-
- HOST=i686-pc-linux-gnu PACKAGES="g++-multilib python3-zmq" DEP_OPTS="NO_QT=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" CONFIG_SHELL="/bin/dash"
54+
- >-
55+
HOST=i686-pc-linux-gnu
56+
PACKAGES="g++-multilib python3-zmq"
57+
DEP_OPTS="NO_QT=1"
58+
RUN_TESTS=true
59+
GOAL="install"
60+
BITCOIN_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++"
61+
CONFIG_SHELL="/bin/dash"
3762
# x86_64 Linux (uses qt5 dev package instead of depends Qt to speed up build and avoid timeout)
38-
- HOST=x86_64-unknown-linux-gnu PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CXXFLAGS=\"-g0 -O2\""
63+
- >-
64+
HOST=x86_64-unknown-linux-gnu
65+
PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools protobuf-compiler libdbus-1-dev libharfbuzz-dev libprotobuf-dev"
66+
DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1"
67+
RUN_TESTS=true
68+
GOAL="install"
69+
BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-glibc-back-compat --enable-reduce-exports --enable-debug CXXFLAGS=\"-g0 -O2\""
3970
# x86_64 Linux (Qt5 & system libs)
40-
- HOST=x86_64-unknown-linux-gnu PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev" NO_DEPENDS=1 RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
71+
- >-
72+
HOST=x86_64-unknown-linux-gnu
73+
PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
74+
NO_DEPENDS=1
75+
RUN_TESTS=true
76+
GOAL="install"
77+
BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports --with-gui=qt5 CPPFLAGS=-DDEBUG_LOCKORDER"
4178
# x86_64 Linux, No wallet
42-
- HOST=x86_64-unknown-linux-gnu PACKAGES="python3" DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
79+
- >-
80+
HOST=x86_64-unknown-linux-gnu
81+
PACKAGES="python3"
82+
DEP_OPTS="NO_WALLET=1"
83+
RUN_TESTS=true
84+
GOAL="install"
85+
BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
4386
# Cross-Mac
44-
- HOST=x86_64-apple-darwin14 PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git" BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror" OSX_SDK=10.11 GOAL="all deploy"
87+
- >-
88+
HOST=x86_64-apple-darwin14
89+
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
90+
BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror"
91+
OSX_SDK=10.11
92+
GOAL="all deploy"
4593
4694
before_install:
4795
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
96+
- BEGIN_FOLD () { echo ""; CURRENT_FOLD_NAME=$1; echo "travis_fold:start:${CURRENT_FOLD_NAME}"; }
97+
- END_FOLD () { RET=$?; echo "travis_fold:end:${CURRENT_FOLD_NAME}"; return $RET; }
4898
install:
4999
- travis_retry docker pull $DOCKER_NAME_TAG
50100
- env | grep -E '^(CCACHE_|WINEDEBUG|BOOST_TEST_RANDOM|CONFIG_SHELL)' | tee /tmp/env
@@ -66,16 +116,16 @@ script:
66116
- OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
67117
- BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
68118
- if [ -z "$NO_DEPENDS" ]; then DOCKER_EXEC ccache --max-size=$CCACHE_SIZE; fi
69-
- test -n "$CONFIG_SHELL" && DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh" || DOCKER_EXEC ./autogen.sh
119+
- BEGIN_FOLD autogen; test -n "$CONFIG_SHELL" && DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh" || DOCKER_EXEC ./autogen.sh; END_FOLD
70120
- mkdir build && cd build
71-
- DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
72-
- DOCKER_EXEC make distdir VERSION=$HOST
121+
- BEGIN_FOLD configure; DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false); END_FOLD
122+
- BEGIN_FOLD distdir; DOCKER_EXEC make distdir VERSION=$HOST; END_FOLD
73123
- cd bitcoin-$HOST
74-
- DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
75-
- DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
76-
- if [ "$RUN_TESTS" = "true" ]; then DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; fi
124+
- BEGIN_FOLD configure; DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false); END_FOLD
125+
- BEGIN_FOLD build; DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false ); END_FOLD
126+
- if [ "$RUN_TESTS" = "true" ]; then BEGIN_FOLD unit-tests; DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1; END_FOLD; fi
77127
- if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then extended="--extended --exclude feature_pruning,feature_dbcrash"; fi
78-
- if [ "$RUN_TESTS" = "true" ]; then DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; fi
128+
- if [ "$RUN_TESTS" = "true" ]; then BEGIN_FOLD functional-tests; DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended}; END_FOLD; fi
79129
after_script:
80130
- echo $TRAVIS_COMMIT_RANGE
81131
- echo $TRAVIS_COMMIT_LOG

0 commit comments

Comments
 (0)