Skip to content

Commit 9e0aabe

Browse files
committed
Merge #17367: ci: Run non-cross-compile builds natively
faf757a ci: Guess the native host when not cross compiling (MarcoFalke) fa8a60b ci: Run non-cross-compile builds natively (MarcoFalke) fa56bcb ci: Run CI_WAIT only on travis (MarcoFalke) Pull request description: non-cross-compile ci builds should not hardcode an architecture, so they can be run on any ci system ACKs for top commit: laanwj: re-ACK faf757a Tree-SHA512: 97f86ad411e98c6317a62f829bee26c16dbe3fa54d8ac013018f7669b653d7d6d750740b2ecfb7175195d5fffc701ce503b0d11802b97af30904b51bb23f2073
2 parents 8021392 + faf757a commit 9e0aabe

9 files changed

+13
-14
lines changed

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
dist: xenial
2929
os: linux
3030
language: minimal
31+
arch: amd64
3132
cache:
3233
ccache: true
3334
directories:
@@ -46,6 +47,7 @@ stages:
4647
env:
4748
global:
4849
- CI_RETRY_EXE="travis_retry"
50+
- CI_WAIT="while sleep 500; do echo .; done"
4951
- CACHE_ERR_MSG="Error! Initial build successful, but not enough time remains to run later build stages and tests. Please manually re-run this job by using the travis restart button or asking a bitcoin maintainer to restart. The next run should not time out because the build cache has been saved."
5052
before_install:
5153
- set -o errexit; source ./ci/test/00_setup_env.sh
@@ -113,33 +115,33 @@ jobs:
113115
- stage: test
114116
name: 'x86_64 Linux [GOAL: install] [bionic] [uses qt5 dev package instead of depends Qt to speed up build and avoid timeout] [unsigned char]'
115117
env: >-
116-
FILE_ENV="./ci/test/00_setup_env_amd64_qt5.sh"
118+
FILE_ENV="./ci/test/00_setup_env_native_qt5.sh"
117119
118120
- stage: test
119121
name: 'x86_64 Linux [GOAL: install] [trusty] [no functional tests, no depends, only system libs]'
120122
env: >-
121-
FILE_ENV="./ci/test/00_setup_env_amd64_trusty.sh"
123+
FILE_ENV="./ci/test/00_setup_env_native_trusty.sh"
122124
123125
- stage: test
124126
name: 'x86_64 Linux [GOAL: install] [xenial] [no depends, only system libs, sanitizers: thread (TSan), no wallet]'
125127
env: >-
126-
FILE_ENV="./ci/test/00_setup_env_amd64_tsan.sh"
128+
FILE_ENV="./ci/test/00_setup_env_native_tsan.sh"
127129
TEST_RUNNER_EXTRA="--exclude feature_block" # Not enough memory on travis machines
128130
129131
- stage: test
130132
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
131133
env: >-
132-
FILE_ENV="./ci/test/00_setup_env_amd64_asan.sh"
134+
FILE_ENV="./ci/test/00_setup_env_native_asan.sh"
133135
134136
- stage: test
135137
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: fuzzer,address,undefined]'
136138
env: >-
137-
FILE_ENV="./ci/test/00_setup_env_amd64_fuzz.sh"
139+
FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh"
138140
139141
- stage: test
140142
name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
141143
env: >-
142-
FILE_ENV="./ci/test/00_setup_env_amd64_nowallet.sh"
144+
FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh"
143145
144146
- stage: test
145147
name: 'macOS 10.10 [GOAL: deploy] [no functional tests]'

ci/test/00_setup_env.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ echo "Fallback to default values in env (if not yet set)"
2121
export MAKEJOBS=${MAKEJOBS:--j4}
2222
# A folder for the ci system to put temporary files (ccache, datadirs for tests, ...)
2323
export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch/}
24-
export HOST=${HOST:-x86_64-unknown-linux-gnu}
24+
# What host to compile for. See also ./depends/README.md
25+
# Tests that need cross-compilation export the appropriate HOST.
26+
# Tests that run natively guess the host
27+
export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")}
2528
# Whether to prefer BusyBox over GNU utilities
2629
export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
2730
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}

ci/test/00_setup_env_amd64_asan.sh renamed to ci/test/00_setup_env_native_asan.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export HOST=x86_64-unknown-linux-gnu
109
export PACKAGES="clang llvm 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 libqrencode-dev"
1110
export NO_DEPENDS=1
1211
export GOAL="install"

ci/test/00_setup_env_amd64_fuzz.sh renamed to ci/test/00_setup_env_native_fuzz.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export HOST=x86_64-unknown-linux-gnu
109
export PACKAGES="clang llvm python3 libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev"
1110
export NO_DEPENDS=1
1211
export RUN_UNIT_TESTS=false

ci/test/00_setup_env_amd64_nowallet.sh renamed to ci/test/00_setup_env_native_nowallet.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export HOST=x86_64-unknown-linux-gnu
109
export PACKAGES="python3-zmq"
1110
export DEP_OPTS="NO_WALLET=1"
1211
export GOAL="install"

ci/test/00_setup_env_amd64_qt5.sh renamed to ci/test/00_setup_env_native_qt5.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export HOST=x86_64-unknown-linux-gnu
109
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
1110
export DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1"
1211
export TEST_RUNNER_EXTRA="--coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash

ci/test/00_setup_env_amd64_trusty.sh renamed to ci/test/00_setup_env_native_trusty.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export HOST=x86_64-unknown-linux-gnu
109
export DOCKER_NAME_TAG=ubuntu:14.04
1110
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libicu-dev libpng-dev libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.1++-dev libzmq3-dev libqrencode-dev"
1211
export NO_DEPENDS=1

ci/test/00_setup_env_amd64_tsan.sh renamed to ci/test/00_setup_env_native_tsan.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export HOST=x86_64-unknown-linux-gnu
109
export DOCKER_NAME_TAG=ubuntu:16.04
1110
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libssl-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 libqrencode-dev"
1211
export NO_DEPENDS=1

ci/test/06_script_b.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fi
3232

3333
if [ "$RUN_UNIT_TESTS" = "true" ]; then
3434
BEGIN_FOLD unit-tests
35-
bash -c "while sleep 500; do echo .; done" & # Print dots in case the unit tests take a long time to run
35+
bash -c "${CI_WAIT}" & # Print dots in case the unit tests take a long time to run
3636
DOCKER_EXEC LD_LIBRARY_PATH=$BASE_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1
3737
END_FOLD
3838
fi

0 commit comments

Comments
 (0)