Skip to content

Commit 6dc1b45

Browse files
author
MarcoFalke
committed
Merge #19267: ci: Upgrade most ci configs to focal
fa05f44 ci: Upgrade most ci configs to focal (MarcoFalke) fad6720 doc: move doc to ci readme (MarcoFalke) fa88077 ci: Have one config run in xenial to test against python3.5 (MarcoFalke) fa6ddb2 travis: Always run multiprocess build (MarcoFalke) Pull request description: Generally developers compile with recent compilers, so bumping the ci configs to a recent OS should be uncontroversial. Older OSes (especially with compiler sanitizers) need workarounds that can be dropped by running on a more recent OS. This pull changes the asan sanitizer and the experimental multiprocess build to use focal. Also, it runs the no_wallet config on xenial to test against python 3.5, according to `doc/dependencies.md`. Finally, all configs that mimic gitian (win and mac) will stay at bionic. ACKs for top commit: Sjors: ACK fa05f44, assuming Travis passes hebasto: ACK fa05f44 Tree-SHA512: 55ec56c71ba2280d27c1a8856a1e6c310b1fbf469d5a8a1dde228063e3892e1dd1e51408ecff7a3d77ac2ae018daa9e9bbbb60598cdeaab8c32a146b11b3e7c4
2 parents febe582 + fa05f44 commit 6dc1b45

9 files changed

+47
-30
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ global_task_template: &GLOBAL_TASK_TEMPLATE
4848
# - choco install python --version=3.7.7 -y
4949

5050
task:
51-
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
51+
name: 'x86_64 Linux [GOAL: install] [focal] [no depends, only system libs, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer]'
5252
<< : *GLOBAL_TASK_TEMPLATE
5353
container:
54-
image: ubuntu:bionic
54+
image: ubuntu:focal
5555
env:
5656
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"

.travis.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
# The test build matrix (stage: test) is constructed to test a wide range of
2-
# configurations, rather than a single pass/fail. This helps to catch build
3-
# failures and logic errors that present on platforms other than the ones the
4-
# author has tested.
5-
#
6-
# Some builders use the dependency-generator in `./depends`, rather than using
7-
# apt-get to install build dependencies. This guarantees that the tester is
8-
# using the same versions as Gitian, so the build results are nearly identical
9-
# to what would be found in a final release.
10-
#
11-
# In order to avoid rebuilding all dependencies for each build, the binaries
12-
# are cached and re-used when possible. Changes in the dependency-generator
13-
# will trigger cache-invalidation and rebuilds as necessary.
14-
#
15-
# These caches can be manually removed if necessary. This is one of the very
1+
# Travis caches can be manually removed if necessary. This is one of the very
162
# few manual operations that is possible with Travis, and it can be done by a
173
# Bitcoin Core GitHub member via the Travis web interface [0].
184
#
@@ -27,7 +13,7 @@
2713

2814
version: ~> 1.0
2915

30-
dist: xenial
16+
dist: bionic
3117
os: linux
3218
language: minimal
3319
arch: amd64
@@ -126,13 +112,12 @@ jobs:
126112
FILE_ENV="./ci/test/00_setup_env_native_fuzz.sh"
127113
128114
- stage: test
129-
name: 'x86_64 Linux [GOAL: install] [bionic] [multiprocess]'
130-
if: type != pull_request OR commit_message =~ /depends:|multiprocess:/ # Skip on non-depends, non-multiprocess PRs
115+
name: 'x86_64 Linux [GOAL: install] [focal] [multiprocess]'
131116
env: >-
132117
FILE_ENV="./ci/test/00_setup_env_native_multiprocess.sh"
133118
134119
- stage: test
135-
name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
120+
name: 'x86_64 Linux [GOAL: install] [xenial] [no wallet]'
136121
env: >-
137122
FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh"
138123

ci/README.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
## ci scripts
1+
## CI Scripts
22

33
This directory contains scripts for each build step in each build stage.
44

5-
Currently three stages `lint`, `extended_lint` and `test` are defined. Each stage has its own lifecycle, similar to the
6-
[Travis CI lifecycle](https://docs.travis-ci.com/user/job-lifecycle#the-job-lifecycle). Every script in here is named
7-
and numbered according to which stage and lifecycle step it belongs to.
8-
9-
### Running a stage locally
5+
### Running a Stage Locally
106

117
Be aware that the tests will be built and run in-place, so please run at your own risk.
128
If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first.
@@ -36,3 +32,34 @@ To run the test stage with a specific configuration,
3632
```
3733
FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh
3834
```
35+
36+
### Configurations
37+
38+
The test files (`FILE_ENV`) are constructed to test a wide range of
39+
configurations, rather than a single pass/fail. This helps to catch build
40+
failures and logic errors that present on platforms other than the ones the
41+
author has tested.
42+
43+
Some builders use the dependency-generator in `./depends`, rather than using
44+
the system package manager to install build dependencies. This guarantees that
45+
the tester is using the same versions as the release builds, which also use
46+
`./depends`.
47+
48+
If no `FILE_ENV` has been specified or values are left out, `00_setup_env.sh`
49+
is used as the default configuration with fallback values.
50+
51+
It is also possible to force a specific configuration without modifying the
52+
file. For example,
53+
54+
```
55+
MAKEJOBS="-j1" FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh
56+
```
57+
58+
The files starting with `0n` (`n` greater than 0) are the scripts that are run
59+
in order.
60+
61+
### Cache
62+
63+
In order to avoid rebuilding all dependencies for each build, the binaries are
64+
cached and re-used when possible. Changes in the dependency-generator will
65+
trigger cache-invalidation and rebuilds as necessary.

ci/test/00_setup_env_mac_host.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 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)
1011
export PIP_PACKAGES="zmq"
1112
export GOAL="install"
1213
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror"

ci/test/00_setup_env_native_asan.sh

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

99
export CONTAINER_NAME=ci_native_asan
10-
export PACKAGES="clang-8 llvm-8 python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
11-
# Use clang-8 instead of default clang (which is clang-6 on Bionic) to avoid spurious segfaults when running on ppc64le
10+
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
11+
export DOCKER_NAME_TAG=ubuntu:20.04
1212
export NO_DEPENDS=1
1313
export GOAL="install"
14-
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang-8 CXX=clang++-8"
14+
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++"

ci/test/00_setup_env_native_multiprocess.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_native_multiprocess
10+
export DOCKER_NAME_TAG=ubuntu:20.04
1011
export PACKAGES="cmake python3"
1112
export DEP_OPTS="MULTIPROCESS=1"
1213
export GOAL="install"

ci/test/00_setup_env_native_nowallet.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_native_nowallet
10+
export DOCKER_NAME_TAG=ubuntu:16.04 # Use xenial to have one config run the tests in python3.5, see doc/dependencies.md
1011
export PACKAGES="python3-zmq"
1112
export DEP_OPTS="NO_WALLET=1"
1213
export GOAL="install"

ci/test/00_setup_env_native_qt5.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_native_qt5
10+
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can compile our c++17 and run our functional tests in python3
1011
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
1112
export DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1"
1213
export TEST_RUNNER_EXTRA="--previous-releases --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_win64.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_win64
10+
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win64 (bionic is used in the gitian build as well)
1011
export HOST=x86_64-w64-mingw32
1112
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
1213
export RUN_FUNCTIONAL_TESTS=false

0 commit comments

Comments
 (0)