Skip to content

Commit 3a53927

Browse files
committed
ci: Integrate ccache into MSVC build
1 parent c109e7d commit 3a53927

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
@@ -85,6 +85,8 @@ task:
8585
CI_VCPKG_TAG: '2022.02.23'
8686
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
8787
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
88+
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
89+
WRAPPED_CL: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat'
8890
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip'
8991
QT_LOCAL_PATH: 'C:\qt-everywhere-src-5.15.2.zip'
9092
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.2'
@@ -134,9 +136,13 @@ task:
134136
- msbuild -version
135137
populate_script:
136138
- mkdir %VCPKG_DEFAULT_BINARY_CACHE%
137-
install_python_script:
139+
ccache_cache:
140+
folder: '%CCACHE_DIR%'
141+
install_tools_script:
142+
- choco install --yes --no-progress ccache
138143
- choco install --yes --no-progress python3 --version=3.9.6
139144
- pip install zmq
145+
- ccache --version
140146
- python -VV
141147
install_vcpkg_script:
142148
- cd ..
@@ -148,9 +154,12 @@ task:
148154
- .\vcpkg integrate install
149155
- .\vcpkg version
150156
build_script:
157+
- '%x64_NATIVE_TOOLS%'
151158
- cd %CIRRUS_WORKING_DIR%
159+
- ccache --zero-stats
152160
- python build_msvc\msvc-autogen.py
153-
- msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
161+
- msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL% -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
162+
- ccache --show-stats
154163
unit_tests_script:
155164
- src\test_bitcoin.exe -l test_suite
156165
- 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)