Skip to content

Commit f59686b

Browse files
authored
Merge branch 'master' into trim-headers-test
2 parents 8bf5123 + 5f1cc1a commit f59686b

File tree

1,409 files changed

+172012
-144594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,409 files changed

+172012
-144594
lines changed

.appveyor.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.cirrus.yml

Lines changed: 144 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
### Global defaults
2-
3-
env:
1+
env: # Global defaults
42
SECP256K1_TEST_ITERS: 16 # ELEMENTS: avoid test timeouts on arm
53
PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y"
64
MAKEJOBS: "-j3" # ELEMENTS: reduced from j4
@@ -19,57 +17,47 @@ persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE
1917
persistent_worker: {} # https://cirrus-ci.org/guide/persistent-workers/
2018

2119
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
22-
base_template: &BASE_TEMPLATE
20+
filter_template: &FILTER_TEMPLATE
2321
skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution
22+
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
23+
24+
base_template: &BASE_TEMPLATE
25+
<< : *FILTER_TEMPLATE
2426
merge_base_script:
25-
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
27+
# Unconditionally install git (used in fingerprint_script) and set the
28+
# default git author name (used in verify-commits.py)
2629
- bash -c "$PACKAGE_MANAGER_INSTALL git"
27-
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
2830
- git config --global user.email "[email protected]"
2931
- git config --global user.name "ci"
32+
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
33+
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
3034
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
31-
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
3235

33-
global_task_template: &GLOBAL_TASK_TEMPLATE
34-
<< : *BASE_TEMPLATE
36+
main_template: &MAIN_TEMPLATE
3537
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
3638
container:
3739
# https://cirrus-ci.org/faq/#are-there-any-limits
3840
# Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
3941
cpu: 2
42+
greedy: true
4043
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
4144
ccache_cache:
4245
folder: "/tmp/ccache_dir"
4346
depends_built_cache:
4447
folder: "depends/built"
48+
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-list -1 HEAD ./depends)
4549
ci_script:
4650
- ./ci/test_run_all.sh
4751

48-
depends_sdk_cache_template: &DEPENDS_SDK_CACHE_TEMPLATE
49-
depends_sdk_cache:
50-
folder: "depends/sdk-sources"
52+
global_task_template: &GLOBAL_TASK_TEMPLATE
53+
<< : *BASE_TEMPLATE
54+
<< : *MAIN_TEMPLATE
5155

5256
compute_credits_template: &CREDITS_TEMPLATE
5357
# https://cirrus-ci.org/pricing/#compute-credits
5458
# Only use credits for pull requests to the main repo
5559
use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'ElementsProject/elements' && $CIRRUS_PR != ""
5660

57-
#task:
58-
# name: "Windows"
59-
# windows_container:
60-
# image: cirrusci/windowsservercore:2019
61-
# env:
62-
# CIRRUS_SHELL: powershell
63-
# PATH: 'C:\Python37;C:\Python37\Scripts;%PATH%'
64-
# PYTHONUTF8: 1
65-
# QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
66-
# QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
67-
# QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
68-
# VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
69-
# VCPKG_COMMIT_ID: 'ed0df8ecc4ed7e755ea03e18aaf285fd9b4b4a74'
70-
# install_script:
71-
# - choco install python --version=3.7.7 -y
72-
7361
task:
7462
name: 'lint [bionic]'
7563
<< : *BASE_TEMPLATE
@@ -85,19 +73,114 @@ task:
8573
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
8674

8775
task:
88-
name: 'ARM [unit tests, no functional tests] [buster]'
76+
name: "Win64 native [msvc]"
77+
<< : *FILTER_TEMPLATE
78+
windows_container:
79+
cpu: 4
80+
memory: 8G
81+
image: cirrusci/windowsservercore:visualstudio2019
82+
timeout_in: 120m
83+
env:
84+
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%'
85+
PYTHONUTF8: 1
86+
CI_VCPKG_TAG: '2021.05.12'
87+
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
88+
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
89+
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip'
90+
QT_LOCAL_PATH: 'C:\qt-everywhere-src-5.15.2.zip'
91+
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.2'
92+
QTBASEDIR: 'C:\Qt_static'
93+
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
94+
IgnoreWarnIntDirInTempDetected: 'true'
95+
merge_script:
96+
- git config --global user.email "[email protected]"
97+
- git config --global user.name "ci"
98+
# Windows filesystem loses the executable bit, and all of the executable
99+
# files are considered "modified" now. It will break the following `git merge`
100+
# command. The next two commands make git ignore this issue.
101+
- git config core.filemode false
102+
- git reset --hard
103+
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH; git merge FETCH_HEAD; }
104+
msvc_qt_built_cache:
105+
folder: "%QTBASEDIR%"
106+
reupload_on_changes: false
107+
fingerprint_script:
108+
- echo %QT_DOWNLOAD_URL%
109+
- msbuild -version
110+
populate_script:
111+
- curl -L -o C:\jom.zip http://download.qt.io/official_releases/jom/jom.zip
112+
- mkdir C:\jom
113+
- tar -xf C:\jom.zip -C C:\jom
114+
- curl -L -o %QT_LOCAL_PATH% %QT_DOWNLOAD_URL%
115+
- tar -xf %QT_LOCAL_PATH% -C C:\
116+
- '%x64_NATIVE_TOOLS%'
117+
- cd %QT_SOURCE_DIR%
118+
- mkdir build
119+
- cd build
120+
- ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix %QTBASEDIR%
121+
- jom
122+
- jom install
123+
vcpkg_tools_cache:
124+
folder: '%VCPKG_DOWNLOADS%\tools'
125+
reupload_on_changes: false
126+
fingerprint_script:
127+
- echo %CI_VCPKG_TAG%
128+
- msbuild -version
129+
vcpkg_binary_cache:
130+
folder: '%VCPKG_DEFAULT_BINARY_CACHE%'
131+
reupload_on_changes: true
132+
fingerprint_script:
133+
- echo %CI_VCPKG_TAG%
134+
- msbuild -version
135+
populate_script:
136+
- mkdir %VCPKG_DEFAULT_BINARY_CACHE%
137+
install_python_script:
138+
- choco install --yes --no-progress python3 --version=3.9.6
139+
- pip install zmq
140+
- python -VV
141+
install_vcpkg_script:
142+
- cd ..
143+
- git clone --quiet https://github.com/microsoft/vcpkg.git
144+
- cd vcpkg
145+
- git -c advice.detachedHead=false checkout %CI_VCPKG_TAG%
146+
- .\bootstrap-vcpkg -disableMetrics
147+
- echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake
148+
- .\vcpkg integrate install
149+
- .\vcpkg version
150+
build_script:
151+
- cd %CIRRUS_WORKING_DIR%
152+
- python build_msvc\msvc-autogen.py
153+
- msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
154+
unit_tests_script:
155+
- src\test_bitcoin.exe -l test_suite
156+
- src\bench_bitcoin.exe > NUL
157+
- python test\util\test_runner.py
158+
- python test\util\rpcauth-test.py
159+
functional_tests_script:
160+
# Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted".
161+
# See: https://docs.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance
162+
- netsh int ipv4 set dynamicport tcp start=1025 num=64511
163+
- netsh int ipv6 set dynamicport tcp start=1025 num=64511
164+
# Exclude feature_dbcrash for now due to timeout
165+
- python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=4000 --jobs=4 --timeout-factor=8 --extended --exclude feature_dbcrash
166+
167+
task:
168+
name: 'ARM [unit tests, no functional tests] [bullseye]'
89169
<< : *GLOBAL_TASK_TEMPLATE
90170
container:
91-
image: debian:buster
171+
image: debian:bullseye
172+
docker_arguments:
173+
CI_IMAGE_NAME_TAG: debian:bullseye
174+
<< : *CREDITS_TEMPLATE
92175
env:
93176
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
94177
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
95178

96179
task:
97-
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [focal]'
180+
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
98181
<< : *GLOBAL_TASK_TEMPLATE
99182
container:
100-
image: ubuntu:focal
183+
image: ubuntu:jammy
101184
env:
102185
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
103186
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
@@ -123,51 +206,51 @@ task:
123206
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"
124207

125208
task:
126-
name: '[depends, sanitizers: thread (TSan), no gui] [hirsute]'
209+
name: '[TSan, depends, gui] [jammy]'
127210
<< : *GLOBAL_TASK_TEMPLATE
128211
container:
129-
image: ubuntu:hirsute
212+
image: ubuntu:jammy
130213
cpu: 6 # Increase CPU and Memory to avoid timeout
131214
memory: 24G
132215
env:
133216
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
134-
MAKEJOBS: "-j6" # ELEMENTS: reduced from -j8
135217
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"
136218

137219
task:
138-
name: '[depends, sanitizers: memory (MSan)] [focal]'
220+
name: '[MSan, depends] [focal]'
139221
<< : *GLOBAL_TASK_TEMPLATE
140222
container:
141223
image: ubuntu:focal
142224
env:
143225
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
144226
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
227+
MAKEJOBS: "-j4" # Avoid excessive memory use due to MSan
145228

146229
task:
147-
name: '[no depends, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer] [hirsute]'
230+
name: '[ASan + LSan + UBSan + integer, no depends] [jammy]'
148231
<< : *GLOBAL_TASK_TEMPLATE
149232
container:
150-
image: ubuntu:hirsute
233+
image: ubuntu:jammy
151234
memory: 16G # ELEMENTS: need more memory
152235
cpu: 4 # ELEMENTS: cirrus wants more CPUs if you want more memory
153236
env:
154237
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
155238
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
239+
MAKEJOBS: "-j4" # Avoid excessive memory use
156240

157241
task:
158-
name: '[no depends, sanitizers: fuzzer,address,undefined,integer] [focal]'
242+
name: '[fuzzer,address,undefined,integer, no depends] [jammy]'
159243
<< : *GLOBAL_TASK_TEMPLATE
160244
container:
161-
image: ubuntu:focal
245+
image: ubuntu:jammy
162246
cpu: 8 # Increase CPU and memory to avoid timeout
163247
memory: 16G
164248
env:
165249
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
166-
MAKEJOBS: "-j8"
167250
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"
168251

169252
task:
170-
name: '[multiprocess, DEBUG] [focal]'
253+
name: '[multiprocess, i686, DEBUG] [focal]'
171254
# Disable for Elements for now; Multiprocess build is not supported or tested and fails CI.
172255
only_if: false
173256
<< : *GLOBAL_TASK_TEMPLATE
@@ -177,36 +260,39 @@ task:
177260
memory: 16G # The default memory is sometimes just a bit too small, so double everything
178261
env:
179262
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
180-
MAKEJOBS: "-j8"
181-
FILE_ENV: "./ci/test/00_setup_env_native_multiprocess.sh"
263+
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
182264

183265
task:
184-
name: '[no wallet] [bionic]'
266+
name: '[no wallet, libbitcoinkernel] [bionic]'
185267
<< : *GLOBAL_TASK_TEMPLATE
186268
container:
187269
image: ubuntu:bionic
188270
env:
189271
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
190-
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"
272+
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"
191273

192274
task:
193-
name: 'macOS 10.14 [gui, no tests] [focal]'
194-
<< : *DEPENDS_SDK_CACHE_TEMPLATE
195-
<< : *GLOBAL_TASK_TEMPLATE
275+
name: 'macOS 10.15 [gui, no tests] [focal]'
276+
<< : *BASE_TEMPLATE
277+
macos_sdk_cache:
278+
folder: "depends/SDKs/$MACOS_SDK"
279+
fingerprint_key: "$MACOS_SDK"
280+
<< : *MAIN_TEMPLATE
196281
container:
197282
image: ubuntu:focal
198283
env:
284+
MACOS_SDK: "Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers"
199285
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
200286
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
201287

202288
task:
203-
name: 'macOS 11 native [gui] [no depends]'
289+
name: 'macOS 12 native [gui, system sqlite only] [no depends]'
204290
brew_install_script:
205-
- brew install boost libevent berkeley-db4 qt@5 miniupnpc libnatpmp ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt
291+
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
206292
<< : *GLOBAL_TASK_TEMPLATE
207-
osx_instance:
293+
macos_instance:
208294
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
209-
image: big-sur-xcode-12.5 # https://cirrus-ci.org/guide/macOS
295+
image: monterey-xcode-13.2 # https://cirrus-ci.org/guide/macOS
210296
env:
211297
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
212298
CI_USE_APT_INSTALL: "no"
@@ -217,10 +303,13 @@ task:
217303
name: 'ARM64 Android APK [focal]'
218304
# Disable for Elements; Android build is broken and unsupported.
219305
only_if: false
220-
<< : *DEPENDS_SDK_CACHE_TEMPLATE
306+
android_sdk_cache:
307+
folder: "depends/SDKs/android"
308+
fingerprint_key: "ANDROID_API_LEVEL=28 ANDROID_BUILD_TOOLS_VERSION=28.0.3 ANDROID_NDK_VERSION=23.1.7779620"
221309
depends_sources_cache:
222310
folder: "depends/sources"
223-
<< : *GLOBAL_TASK_TEMPLATE
311+
fingerprint_script: git rev-list -1 HEAD ./depends
312+
<< : *MAIN_TEMPLATE
224313
container:
225314
image: ubuntu:focal
226315
env:

0 commit comments

Comments
 (0)