Skip to content

Commit def69e5

Browse files
author
MarcoFalke
committed
Merge #17233: travis: Run unit and functional tests on native arm
facc0da travis: Run unit and functional tests on native arm (MarcoFalke) fafa064 ci: Remove ccache requirement on the host (MarcoFalke) Pull request description: This keeps the cross-compilation to make it easy to run the ci on non-arm hardware. To run this locally in qemu-user as it used to be, just `export QEMU_USER_CMD="qemu-arm -L /usr/arm-linux-gnueabihf/"`. ACKs for top commit: laanwj: LGTM ACK facc0da practicalswift: ACK facc0da -- diff looks correct and Travis seems happy Tree-SHA512: 0dc1bc82eb93e2bd8b159e044f20fe3055f8cdfd73aaa238bd2e178397582144dfc0c6a87bd8270115dafea1a623e642bde5d5f30254f94140f1a2cdb12fc2da
2 parents 5933c6d + facc0da commit def69e5

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.cirrus.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ task:
4545
folder: "/tmp/ccache_dir"
4646
depends_built_cache:
4747
folder: "/tmp/cirrus-ci-build/depends/built"
48-
depends_sdk_cache:
49-
folder: "/tmp/cirrus-ci-build/depends/sdk-sources"
5048
install_script:
5149
- apt-get update
5250
- apt-get -y install git bash ccache

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ jobs:
9494
- set -o errexit; source ./ci/extended_lint/06_script.sh
9595

9696
- stage: test
97-
name: 'ARM [GOAL: install] [unit tests, no functional tests]'
97+
name: 'ARM [GOAL: install] [unit tests, functional tests]'
98+
arch: arm64
9899
env: >-
99100
FILE_ENV="./ci/test/00_setup_env_arm.sh"
101+
QEMU_USER_CMD="" # Can run the tests natively without qemu
100102
101103
- stage: test
102104
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no functional tests]'

ci/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To allow for a wide range of tested environments, but also ensure reproducibilit
1212
requires `docker` to be installed. To install all requirements on Ubuntu, run
1313

1414
```
15-
sudo apt install docker.io ccache bash git
15+
sudo apt install docker.io bash git
1616
```
1717

1818
To run the default test stage,

ci/test/00_setup_env_arm.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@
77
export LC_ALL=C.UTF-8
88

99
export HOST=arm-linux-gnueabihf
10-
export QEMU_USER_CMD="qemu-arm -L /usr/arm-linux-gnueabihf/"
11-
export PACKAGES="python3 g++-arm-linux-gnueabihf busybox qemu-user"
10+
# The host arch is unknown, so we run the tests through qemu.
11+
# If the host is arm and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string.
12+
export QEMU_USER_CMD="${QEMU_USER_CMD:"qemu-arm -L /usr/arm-linux-gnueabihf/"}"
13+
# We don't know whether the host can run the cross compiled binaries. To run them, either qemu-user or libc6:armhf for
14+
# the target is required, so install both.
15+
export DPKG_ADD_ARCH="armhf"
16+
export PACKAGES="python3 g++-arm-linux-gnueabihf busybox qemu-user libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
1217
export USE_BUSY_BOX=true
1318
export RUN_UNIT_TESTS=true
14-
export RUN_FUNCTIONAL_TESTS=false
19+
export RUN_FUNCTIONAL_TESTS=true
1520
export GOAL="install"
1621
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
1722
# This could be removed once the ABI change warning does not show up by default

ci/test/04_install.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
3333
fi
3434

3535
mkdir -p "${BASE_SCRATCH_DIR}"
36-
ccache echo "Creating ccache dir if it didn't already exist"
36+
mkdir -p "${CCACHE_DIR}"
3737

3838
if [ ! -d ${DIR_QA_ASSETS} ]; then
3939
git clone https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS}
@@ -76,6 +76,9 @@ else
7676
DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
7777
fi
7878

79+
if [ -n "$DPKG_ADD_ARCH" ]; then
80+
DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
81+
fi
7982

8083
if [ "$TRAVIS_OS_NAME" != "osx" ]; then
8184
${CI_RETRY_EXE} DOCKER_EXEC apt-get update

0 commit comments

Comments
 (0)