Skip to content

Commit ecf692b

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#24540: ci: Integrate ccache into MSVC build
3a53927 ci: Integrate ccache into MSVC build (Hennadii Stepanov) Pull request description: [ccache 4.6](https://ccache.dev/releasenotes.html#_ccache_4_6): > Added support for caching calls to Microsoft Visual C++ (MSVC) Integrated into our native Windows CI task. [On master](url) (c109e7d): ![Screenshot from 2022-03-12 10-17-58](https://user-images.githubusercontent.com/32963518/158012098-7ac9d441-2eb0-481e-bcc5-3700c1ce2b15.png) [This PR](https://cirrus-ci.com/task/6572984340054016): ![Screenshot from 2022-03-12 10-25-33](https://user-images.githubusercontent.com/32963518/158012361-d6bf88bc-f98d-4771-8b4f-31bf5673d085.png) ``` Summary: Hits: 222 / 222 (100.0 %) Direct: 222 / 222 (100.0 %) Preprocessed: 0 / 0 Misses: 0 Direct: 0 Preprocessed: 0 Errors: 7 Uncacheable: 9 Primary storage: Hits: 444 / 444 (100.0 %) Misses: 0 Cache size (GB): 0.04 / 5.00 (0.86 %) Use the -v/--verbose option for more details. ``` Top commit has no ACKs. Tree-SHA512: d8cf91d8e75a5187cf456960bdf759f857fb9a9b0c4087e5e46ccbe2202aca5f1b9b38a47ec54d98e885c0f5d78de93a3188fb966fa5b346e81907c211ba1e79
2 parents 9e32adb + 3a53927 commit ecf692b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.cirrus.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ task:
8686
CI_VCPKG_TAG: '2022.02.23'
8787
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
8888
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
89+
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
90+
WRAPPED_CL: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat'
8991
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip'
9092
QT_LOCAL_PATH: 'C:\qt-everywhere-src-5.15.2.zip'
9193
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.2'
@@ -135,9 +137,13 @@ task:
135137
- msbuild -version
136138
populate_script:
137139
- mkdir %VCPKG_DEFAULT_BINARY_CACHE%
138-
install_python_script:
140+
ccache_cache:
141+
folder: '%CCACHE_DIR%'
142+
install_tools_script:
143+
- choco install --yes --no-progress ccache
139144
- choco install --yes --no-progress python3 --version=3.9.6
140145
- pip install zmq
146+
- ccache --version
141147
- python -VV
142148
install_vcpkg_script:
143149
- cd ..
@@ -149,9 +155,12 @@ task:
149155
- .\vcpkg integrate install
150156
- .\vcpkg version
151157
build_script:
158+
- '%x64_NATIVE_TOOLS%'
152159
- cd %CIRRUS_WORKING_DIR%
160+
- ccache --zero-stats
153161
- python build_msvc\msvc-autogen.py
154-
- msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
162+
- msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL% -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
163+
- ccache --show-stats
155164
unit_tests_script:
156165
- src\test_bitcoin.exe -l test_suite
157166
- src\bench_bitcoin.exe > NUL

ci/test/wrapped-cl.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ccache cl %*

0 commit comments

Comments
 (0)