-
Notifications
You must be signed in to change notification settings - Fork 38.7k
ci: Add vcpkg tools cache #23215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add vcpkg tools cache #23215
Conversation
7c8a2d9 to
7132a2b
Compare
|
The size of the vcpkg downloads cache will be lesser significantly after bumping vcpkg up to microsoft/vcpkg@0fd101a or later. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
|
cc @MarcoFalke |
|
Concept ACK, but I am not familiar with vcpkg |
|
cc @sipsorcery |
|
I think I mentioned it on the original PR that moved the Windows build to Cirrus but we did have a period of instability that was caused by caching vcpkg dependencies #19431 and #19444. Just thought I'd mention it in case the same issue crops up again and is traced back to this PR. Other than that vcpkg has a new'ish binary caching feature which is recommended for CI use. If vcpkg dependencies are going to be cached again it would seem to make sense to enable it. By only caching the
|
Sorry, I didn't get your point.
We already use binary caching. This PR does not introduce it. It rather makes sure that the cache will be re-populated when vcpkg version is bumped. Maybe also it's reasonable to invalidate the cache when Btw, the "Binary Caching" feature is enabled by default now (as the "Manifest Mode" feature as well), and no need to pass
This PR introduces new cache which is not an internal vcpkg feature, but rather a CI's one. These downloads actually are internal vcpkg dependencies, not ours. |
I don't think so, at least the old appveyor job wasn't. I had it enabled on my personal appveyor job to save 10 minutes on the Bitcoin Core build but I'm pretty sure it was never turned on for the main Bitcoin Core CI job.
I think that's very desireable due to the aforementioned ABI incompatabilites that crop up. It's been my experience that vcpkg, with binary caching enabled, rebuilds dependencies if it detects an updated compiler.
That's good news, I hadn't spotted that. The CI config in this PR is still pegging vcpkg to commit ID An alternative to my suggestion of explicitly setting binary caching on, would be to update the vcpkg commit ID to |
On Cirrus CI Windows job it is enabled: Lines 124 to 125 in 986003a
where the default location is used 🐅 |
I'm not sure just caching the vcpkg download directories is enough.... It's the libraries that are built from the downloaded source archives that are used in the Bitcoin Core build. How those libraries are detected as out of date is the question. Is there any reason not to bump the vcpkg commit to Now that you've pointed out manifests and binary caching are enabled by default it seems like a good idea to take advantage of them. And it would make our discussion academic :). |
Thanks! Done in #23310. Converting this PR into a draft for now. |
13ae568 ci: Bump vcpkg release tag (Hennadii Stepanov) Pull request description: In the new vcpkg release the "Binary Caching" and "Manifest Mode" features are [available by default](https://devblogs.microsoft.com/cppblog/all-vcpkg-enterprise-features-now-generally-available-versioning-binary-caching-manifests-and-registries/). Suggested in bitcoin/bitcoin#23215 (comment) and bitcoin/bitcoin#23215 (comment). ACKs for top commit: sipsorcery: tACK 13ae568. Tree-SHA512: 55558f2a2d395a3ad168eb1b36ffe3b0e6a3336b9a7c764d841345d8bb696b231d697dad36cc723d922d07be65c1b77a05cc9604a09e05e8f13ca8090ecb966d
This change avoids downloading of the cached vcpkg tools that could fail accidentally, and it makes CI task more robust.
|
Rebased and reworked on top of #23310 and #23329 -- 7132a2b -> f778845 (pr23215.01 -> pr23215.02). PR description updated. |
|
Do you mind having another look at this PR? |
|
Makes sense to me. ACK f778845. |
On master (02feae5) vcpkg downloads some tools that are used internally:
If any of downloads above fails the whole CI task fails (see #23107). The most recent failure examples in the master branch:
This PR adds vcpkg tools cache.
Closes #23107.
Note for reviewers. Some patches from the initial PR were split into separated PRs: #23310 and #23329. Therefore, a discussion here could be outdated or irrelevant until the recent push.