Skip to content

Commit 05aeeee

Browse files
author
MarcoFalke
committed
Merge #20339: ci: Run more ci configs on cirrus
77777c8 ci: Run windows ci config on cirrus (MarcoFalke) 3333d69 ci: Run macos ci config on cirrus (MarcoFalke) fa8b111 ci: Run arm ci config on cirrus (MarcoFalke) fa0795f ci: Replace TRAVIS_OS_NAME with CI_OS_NAME (MarcoFalke) fafce1a ci: Move documentation to correct config file (MarcoFalke) Pull request description: ACKs for top commit: hebasto: ACK 77777c8 Tree-SHA512: 581d3bdb2c3e3da20bd8492c6b23d90f3b4f7f9300ade384667e41de9fbbe42bbcef26dd99328839dc0b49be6e303c4c6d1b66ceb5d8009800c52c97685f9080
2 parents 663fd92 + 77777c8 commit 05aeeee

File tree

9 files changed

+70
-49
lines changed

9 files changed

+70
-49
lines changed

.cirrus.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ container:
88
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
99
kvm: true # Use kvm to avoid spurious CI failures in the default virtualization cluster, see https://github.com/bitcoin/bitcoin/issues/20093
1010
env:
11-
PACKAGE_MANAGER_INSTALL : "apt-get update && apt-get install -y"
11+
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
1212
MAKEJOBS: "-j4"
1313
DANGER_RUN_CI_ON_HOST: "1" # Containers will be discarded after the run, so there is no risk that the ci scripts modify the system
1414
TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache
@@ -53,6 +53,22 @@ global_task_template: &GLOBAL_TASK_TEMPLATE
5353
# install_script:
5454
# - choco install python --version=3.7.7 -y
5555

56+
task:
57+
name: 'ARM [GOAL: install] [buster] [unit tests, no functional tests]'
58+
<< : *GLOBAL_TASK_TEMPLATE
59+
container:
60+
image: debian:buster
61+
env:
62+
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
63+
64+
task:
65+
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no boost::process, no functional tests]'
66+
<< : *GLOBAL_TASK_TEMPLATE
67+
container:
68+
image: ubuntu:bionic
69+
env:
70+
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
71+
5672
task:
5773
name: 'x86_64 Linux [GOAL: install] [bionic] [C++17, previous releases, uses qt5 dev package and some depends packages] [unsigned char]'
5874
<< : *GLOBAL_TASK_TEMPLATE
@@ -119,3 +135,17 @@ task:
119135
image: ubuntu:bionic
120136
env:
121137
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
138+
139+
task:
140+
name: 'macOS 10.14 native [GOAL: install] [GUI] [no depends]'
141+
macos_brew_addon_script:
142+
- brew install boost libevent berkeley-db4 qt miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt
143+
<< : *GLOBAL_TASK_TEMPLATE
144+
osx_instance:
145+
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
146+
image: catalina-xcode-12.1 # https://cirrus-ci.org/guide/macOS
147+
env:
148+
DANGER_RUN_CI_ON_HOST: "true"
149+
CI_USE_APT_INSTALL: "no"
150+
PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do
151+
FILE_ENV: "./ci/test/00_setup_env_mac_host.sh"

.travis.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,6 @@ jobs:
6565
script:
6666
- set -o errexit; source ./ci/lint/06_script.sh
6767

68-
- stage: test
69-
name: 'ARM [GOAL: install] [buster] [unit tests, no functional tests]'
70-
arch: arm64 # Can disable QEMU_USER_CMD and run the tests natively without qemu
71-
env: >-
72-
FILE_ENV="./ci/test/00_setup_env_arm.sh"
73-
QEMU_USER_CMD=""
74-
75-
- stage: test
76-
name: 'Win64 [GOAL: deploy] [unit tests, no gui, no boost::process, no functional tests]'
77-
env: >-
78-
FILE_ENV="./ci/test/00_setup_env_win64.sh"
79-
8068
- stage: test
8169
name: '32-bit + dash [GOAL: install] [CentOS 7] [gui]'
8270
env: >-
@@ -86,24 +74,3 @@ jobs:
8674
name: 'x86_64 Linux [GOAL: install] [xenial] [no wallet]'
8775
env: >-
8876
FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh"
89-
90-
- stage: test
91-
name: 'macOS 10.14 native [GOAL: install] [GUI] [no depends]'
92-
os: osx
93-
# Use the most recent version:
94-
# Xcode 11.3.1, macOS 10.14, SDK 10.15
95-
# https://docs.travis-ci.com/user/reference/osx/#macos-version
96-
osx_image: xcode11.3
97-
addons:
98-
homebrew:
99-
packages:
100-
- berkeley-db4
101-
- miniupnpc
102-
- qrencode
103-
- sqlite
104-
- ccache
105-
- zeromq
106-
env: >-
107-
DANGER_RUN_CI_ON_HOST=true
108-
CI_USE_APT_INSTALL=no
109-
FILE_ENV="./ci/test/00_setup_env_mac_host.sh"

ci/test/00_setup_env_mac.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_macos_cross
10+
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to macos (bionic is used in the gitian build as well)
1011
export HOST=x86_64-apple-darwin16
1112
export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools"
1213
export XCODE_VERSION=11.3.1

ci/test/00_setup_env_mac_host.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@
77
export LC_ALL=C.UTF-8
88

99
export HOST=x86_64-apple-darwin16
10-
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to macos (bionic is used in the gitian build as well)
1110
export PIP_PACKAGES="zmq"
1211
export GOAL="install"
1312
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --enable-werror --with-boost-process"
13+
export CI_OS_NAME="macos"
1414
export NO_DEPENDS=1
1515
export OSX_SDK=""
1616
export CCACHE_SIZE=300M
1717

1818
export RUN_SECURITY_TESTS="true"
19-
if [ "$TRAVIS_REPO_SLUG" != "bitcoin/bitcoin" ]; then
20-
export RUN_FUNCTIONAL_TESTS="false"
21-
export EXPECTED_TESTS_DURATION_IN_SECONDS=200
22-
fi

ci/test/00_setup_env_win64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
99
export CONTAINER_NAME=ci_win64
1010
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win64 (bionic is used in the gitian build as well)
1111
export HOST=x86_64-w64-mingw32
12-
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
12+
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64 file"
1313
export RUN_FUNCTIONAL_TESTS=false
1414
export RUN_SECURITY_TESTS="true"
1515
export GOAL="deploy"

ci/test/04_install.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ if [[ $QEMU_USER_CMD == qemu-s390* ]]; then
1313
export LC_ALL=C
1414
fi
1515

16-
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
17-
${CI_RETRY_EXE} pip3 install $PIP_PACKAGES
16+
if [ "$CI_OS_NAME" == "macos" ]; then
17+
IN_GETOPT_BIN="/usr/local/opt/gnu-getopt/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
1818
fi
1919

2020
# Create folders that are mounted into the docker
@@ -26,9 +26,7 @@ export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/l
2626
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan"
2727
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
2828
env | grep -E '^(BITCOIN_CONFIG|BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR)' | tee /tmp/env
29-
if [[ $HOST = *-mingw32 ]]; then
30-
DOCKER_ADMIN="--cap-add SYS_ADMIN"
31-
elif [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
29+
if [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
3230
DOCKER_ADMIN="--cap-add SYS_PTRACE"
3331
fi
3432

@@ -69,16 +67,16 @@ elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
6967
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES
7068
fi
7169

72-
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
70+
if [ "$CI_OS_NAME" == "macos" ]; then
7371
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
7472
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
7573
else
7674
DOCKER_EXEC free -m -h
7775
DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
7876
DOCKER_EXEC echo $(lscpu | grep Endian)
79-
DOCKER_EXEC echo "Free disk space:"
80-
DOCKER_EXEC df -h
8177
fi
78+
DOCKER_EXEC echo "Free disk space:"
79+
DOCKER_EXEC df -h
8280

8381
if [ ! -d ${DIR_QA_ASSETS} ]; then
8482
DOCKER_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets ${DIR_QA_ASSETS}

ci/test/05_before_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
export LC_ALL=C.UTF-8
88

99
# Make sure default datadir does not exist and is never read by creating a dummy file
10-
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
10+
if [ "$CI_OS_NAME" == "macos" ]; then
1111
echo > $HOME/Library/Application\ Support/Bitcoin
1212
else
1313
DOCKER_EXEC echo \> \$HOME/.bitcoin

ci/test/06_script_b.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66

77
export LC_ALL=C.UTF-8
88

9+
if [[ $HOST = *-mingw32 ]]; then
10+
BEGIN_FOLD wrap-wine
11+
# Generate all binaries, so that they can be wrapped
12+
DOCKER_EXEC make $MAKEJOBS -C src/secp256k1 VERBOSE=1
13+
DOCKER_EXEC make $MAKEJOBS -C src/univalue VERBOSE=1
14+
DOCKER_EXEC "${BASE_ROOT_DIR}/ci/test/wrap-wine.sh"
15+
END_FOLD
16+
fi
17+
918
if [ -n "$QEMU_USER_CMD" ]; then
1019
BEGIN_FOLD wrap-qemu
1120
# Generate all binaries, so that they can be wrapped

ci/test/wrap-wine.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2020 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C.UTF-8
8+
9+
for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}.exe; do
10+
# shellcheck disable=SC2044
11+
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename $b_name)"); do
12+
if (file "$b" | grep "Windows"); then
13+
echo "Wrap $b ..."
14+
mv "$b" "${b}_orig"
15+
echo '#!/usr/bin/env bash' > "$b"
16+
echo "wine64 \"${b}_orig\" \"\$@\"" >> "$b"
17+
chmod +x "$b"
18+
fi
19+
done
20+
done

0 commit comments

Comments
 (0)