@@ -2,6 +2,7 @@ env: # Global defaults
22 PACKAGE_MANAGER_INSTALL : " apt-get update && apt-get install -y"
33 MAKEJOBS : " -j10"
44 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
5+ CI_FAILFAST_TEST_LEAVE_DANGLING : " 1" # Cirrus CI does not care about dangling process and setting this variable avoids killing the CI script itself on error
56 CCACHE_SIZE : " 200M"
67 CCACHE_DIR : " /tmp/ccache_dir"
78 CCACHE_NOHASHDIR : " 1" # Debug info might contain a stale path if the build dir changes, but this is fine
@@ -23,14 +24,11 @@ filter_template: &FILTER_TEMPLATE
2324base_template : &BASE_TEMPLATE
2425 << : *FILTER_TEMPLATE
2526 merge_base_script :
26- # Unconditionally install git (used in fingerprint_script) and set the
27- # default git author name (used in verify-commits.py)
27+ # Unconditionally install git (used in fingerprint_script).
2828 - bash -c "$PACKAGE_MANAGER_INSTALL git"
29- - git config --global user.email "ci@ci.ci"
30- - git config --global user.name "ci"
3129 - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
32- - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
33- - git merge FETCH_HEAD # Merge base to detect silent merge conflicts
30+ - git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
31+ - git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
3432
3533main_template : &MAIN_TEMPLATE
3634 timeout_in : 120m # https://cirrus-ci.org/faq/#instance-timed-out
@@ -80,39 +78,48 @@ task:
8078 << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
8179
8280task :
83- name : " Win64 native [msvc]"
81+ name : ' tidy [jammy]'
82+ << : *GLOBAL_TASK_TEMPLATE
83+ container :
84+ image : ubuntu:jammy
85+ cpu : 2
86+ memory : 5G
87+ # For faster CI feedback, immediately schedule the linters
88+ << : *CREDITS_TEMPLATE
89+ env :
90+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
91+ FILE_ENV : " ./ci/test/00_setup_env_native_tidy.sh"
92+
93+ task :
94+ name : " Win64 native [vs2022]"
8495 << : *FILTER_TEMPLATE
8596 windows_container :
86- cpu : 4
87- memory : 8G
88- image : cirrusci/windowsservercore:visualstudio2019
97+ cpu : 6
98+ memory : 12G
99+ image : cirrusci/windowsservercore:visualstudio2022
89100 timeout_in : 120m
90101 env :
91- PATH : ' C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019 \BuildTools\MSBuild\Current\Bin;%PATH%'
102+ PATH : ' C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022 \BuildTools\MSBuild\Current\Bin;%PATH%'
92103 PYTHONUTF8 : 1
93- CI_VCPKG_TAG : ' 2021.05.12 '
104+ CI_VCPKG_TAG : ' 2022.06.16.1 '
94105 VCPKG_DOWNLOADS : ' C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
95106 VCPKG_DEFAULT_BINARY_CACHE : ' C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
96- QT_DOWNLOAD_URL : ' https://download.qt.io/official_releases/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip'
97- QT_LOCAL_PATH : ' C:\qt-everywhere-opensource-src-5.15.3.zip'
98- QT_SOURCE_DIR : ' C:\qt-everywhere-src-5.15.3'
107+ CCACHE_DIR : ' C:\Users\ContainerAdministrator\AppData\Local\ccache'
108+ WRAPPED_CL : ' C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat'
109+ QT_DOWNLOAD_URL : ' https://download.qt.io/official_releases/qt/5.15/5.15.5/single/qt-everywhere-opensource-src-5.15.5.zip'
110+ QT_LOCAL_PATH : ' C:\qt-everywhere-opensource-src-5.15.5.zip'
111+ QT_SOURCE_DIR : ' C:\qt-everywhere-src-5.15.5'
99112 QTBASEDIR : ' C:\Qt_static'
100- x64_NATIVE_TOOLS : ' "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
113+ x64_NATIVE_TOOLS : ' "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
114+ QT_CONFIGURE_COMMAND: '..\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'
101115 IgnoreWarnIntDirInTempDetected : ' true'
102116 merge_script :
103- - git config --global user.email "ci@ci.ci"
104- - git config --global user.name "ci"
105- # Windows filesystem loses the executable bit, and all of the executable
106- # files are considered "modified" now. It will break the following `git merge`
107- # command. The next two commands make git ignore this issue.
108- - git config core.filemode false
109- - git reset --hard
110- - PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH; git merge FETCH_HEAD; }
117+ - PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git checkout FETCH_HEAD; }
111118 msvc_qt_built_cache :
112119 folder : " %QTBASEDIR%"
113120 reupload_on_changes : false
114121 fingerprint_script :
115- - echo %QT_DOWNLOAD_URL%
122+ - echo %QT_DOWNLOAD_URL% %QT_CONFIGURE_COMMAND%
116123 - msbuild -version
117124 populate_script :
118125 - curl -L -o C:\jom.zip http://download.qt.io/official_releases/jom/jom.zip
@@ -124,7 +131,7 @@ task:
124131 - cd %QT_SOURCE_DIR%
125132 - mkdir build
126133 - cd build
127- - ..\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%
134+ - ' %QT_CONFIGURE_COMMAND% -prefix %QTBASEDIR%'
128135 - jom
129136 - jom install
130137 vcpkg_tools_cache :
@@ -138,12 +145,17 @@ task:
138145 reupload_on_changes : true
139146 fingerprint_script :
140147 - echo %CI_VCPKG_TAG%
148+ - type build_msvc\vcpkg.json
141149 - msbuild -version
142150 populate_script :
143151 - mkdir %VCPKG_DEFAULT_BINARY_CACHE%
144- install_python_script :
152+ ccache_cache :
153+ folder : ' %CCACHE_DIR%'
154+ install_tools_script :
155+ - choco install --yes --no-progress ccache --version=4.6.1
145156 - choco install --yes --no-progress python3 --version=3.9.6
146157 - pip install zmq
158+ - ccache --version
147159 - python -VV
148160 install_vcpkg_script :
149161 - cd ..
@@ -155,9 +167,12 @@ task:
155167 - .\vcpkg integrate install
156168 - .\vcpkg version
157169 build_script :
170+ - ' %x64_NATIVE_TOOLS%'
158171 - cd %CIRRUS_WORKING_DIR%
172+ - ccache --zero-stats --max-size=%CCACHE_SIZE%
159173 - python build_msvc\msvc-autogen.py
160- - msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
174+ - msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL% -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
175+ - ccache --show-stats
161176 unit_tests_script :
162177 - src\test_bitcoin.exe -l test_suite
163178 - src\bench_bitcoin.exe > NUL
@@ -174,14 +189,12 @@ task:
174189task :
175190 name : ' ARM [unit tests, no functional tests] [bullseye]'
176191 << : *GLOBAL_TASK_TEMPLATE
177- arm_container :
178- image : debian:bullseye
179- cpu : 2
180- memory : 8G
192+ container :
193+ docker_arguments :
194+ CI_IMAGE_NAME_TAG : debian:bullseye
195+ FILE_ENV : " ./ci/test/00_setup_env_arm.sh "
181196 env :
182197 << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
183- FILE_ENV : " ./ci/test/00_setup_env_arm.sh"
184- QEMU_USER_CMD : " " # Disable qemu and run the test natively
185198
186199task :
187200 name : ' Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
@@ -203,7 +216,7 @@ task:
203216 FILE_ENV : " ./ci/test/00_setup_env_i686_centos.sh"
204217
205218task :
206- name : ' [previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [bionic ]'
219+ name : ' [previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [buster ]'
207220 previous_releases_cache :
208221 folder : " releases"
209222 << : *GLOBAL_TASK_TEMPLATE
@@ -234,12 +247,20 @@ task:
234247 MAKEJOBS : " -j4" # Avoid excessive memory use due to MSan
235248
236249task :
237- name : ' [ASan + LSan + UBSan + integer, no depends] [jammy]'
250+ name : ' [ASan + LSan + UBSan + integer, no depends, USDT ] [jammy]'
238251 << : *GLOBAL_TASK_TEMPLATE
239- container :
240- image : ubuntu:jammy
252+ # We can't use a 'container' for the USDT interface tests as the CirrusCI
253+ # containers don't have privileges to hook into bitcoind. CirrusCI uses
254+ # Google Compute Engine instances: https://cirrus-ci.org/guide/custom-vms/
255+ # Images can be found here: https://cloud.google.com/compute/docs/images/os-details
256+ compute_engine_instance :
257+ image_project : ubuntu-os-cloud
258+ image : family/ubuntu-2204-lts # when upgrading, check if we can drop "ADD_UNTRUSTED_BPFCC_PPA"
259+ cpu : 4
260+ memory : 12G
241261 env :
242262 << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
263+ HOME : /root/ # Only needed for compute_engine_instance
243264 FILE_ENV : " ./ci/test/00_setup_env_native_asan.sh"
244265 MAKEJOBS : " -j4" # Avoid excessive memory use
245266
@@ -266,13 +287,13 @@ task:
266287 FILE_ENV : " ./ci/test/00_setup_env_i686_multiprocess.sh"
267288
268289task :
269- name : ' [no wallet] [bionic]'
290+ name : ' [no wallet, libbitcoinkernel ] [bionic]'
270291 << : *GLOBAL_TASK_TEMPLATE
271292 container :
272293 image : ubuntu:bionic
273294 env :
274295 << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
275- FILE_ENV : " ./ci/test/00_setup_env_native_nowallet .sh"
296+ FILE_ENV : " ./ci/test/00_setup_env_native_nowallet_libbitcoinkernel .sh"
276297
277298task :
278299 name : ' macOS 10.15 [gui, no tests] [focal]'
@@ -299,19 +320,3 @@ task:
299320 CI_USE_APT_INSTALL : " no"
300321 PACKAGE_MANAGER_INSTALL : " echo" # Nothing to do
301322 FILE_ENV : " ./ci/test/00_setup_env_mac_native_arm64.sh"
302-
303- task :
304- name : ' ARM64 Android APK [focal]'
305- << : *BASE_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"
309- depends_sources_cache :
310- folder : " depends/sources"
311- fingerprint_script : git rev-list -1 HEAD ./depends
312- << : *MAIN_TEMPLATE
313- container :
314- image : ubuntu:focal
315- env :
316- << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
317- FILE_ENV : " ./ci/test/00_setup_env_android.sh"
0 commit comments