Skip to content

ci(vcpkg): Limit setup to vcpkg presets - #3128

Merged
xezon merged 1 commit into
TheSuperHackers:mainfrom
bobtista:bobtista/ci/limit-vcpkg-setup
Aug 13, 2026
Merged

ci(vcpkg): Limit setup to vcpkg presets#3128
xezon merged 1 commit into
TheSuperHackers:mainfrom
bobtista:bobtista/ci/limit-vcpkg-setup

Conversation

@bobtista

@bobtista bobtista commented Aug 13, 2026

Copy link
Copy Markdown

build-toolchain.yml runs run-vcpkg for every matrix preset even though only the win32-vcpkg* presets use the vcpkg toolchain. With executable caching disabled, every job bootstraps vcpkg independently, so transient GitHub release download failures make unrelated VC6 and ordinary Win32 builds fail.

Now vcpkg setup and binary-cache steps run only for presets containing vcpkg, the vcpkg executable and repository data are cached, and run-vcpkg is updated to the Node 24-based v11.6 release. The active VC6 and ordinary Win32 matrices no longer depend on vcpkg setup.

Todo:

  • Parse the workflow as YAML
  • Run git diff --check
  • Confirm GenCI passes
  • Replicate to Generals — N/A, shared CI workflow

@bobtista
bobtista marked this pull request as ready for review August 13, 2026 19:25
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

CI: Run vcpkg setup only for vcpkg presets and enable caching

⚙️ Configuration changes ✨ Enhancement 🕐 10-20 Minutes

Grey Divider

AI Description

• Gate all vcpkg setup/cache steps behind presets containing "vcpkg" to avoid unnecessary
 bootstraps.
• Enable caching for the vcpkg repo/executable and binary cache to reduce transient download
 failures.
• Bump lukka/run-vcpkg to v11.6 and stop using doNotCache for vcpkg presets.
Diagram

graph TD
  A["Matrix preset"] --> B{"Preset contains vcpkg?"}
  B -->|"No"| G["Build preset"]
  B -->|"Yes"| C["Compute cache key"] --> D["Restore bin cache"] --> E["run-vcpkg v11.6"] --> F["Configure cache dir"] --> G
  G --> H["Save bin cache (win32-vcpkg-debug only)"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Add an explicit matrix flag (uses_vcpkg)
  • ➕ Avoids relying on substring matching ("contains(preset, 'vcpkg')")
  • ➕ More robust if preset naming conventions change
  • ➕ Makes intent clearer in the workflow/matrix definition
  • ➖ Requires updating matrix generation/definition to carry the flag
  • ➖ Slightly more verbose workflow wiring
2. Split vcpkg into a dedicated job reused by vcpkg presets
  • ➕ Hard separation: non-vcpkg builds cannot be impacted by vcpkg setup
  • ➕ Can centralize caching and vcpkg bootstrap logic
  • ➕ Potentially parallelizes/isolates failures better
  • ➖ More workflow complexity (job outputs/artifacts, dependencies)
  • ➖ May increase runtime due to job orchestration overhead

Recommendation: Current approach is a good pragmatic fix: gating vcpkg work to vcpkg presets and enabling caching directly addresses flaky bootstrap failures and reduces wasted work. If preset naming is expected to evolve, consider the explicit matrix flag approach for long-term robustness; otherwise, the substring gate is sufficient and low-risk.

Files changed (1) +7 / -6

Other (1) +7 / -6
build-toolchain.ymlGate vcpkg steps to vcpkg presets and enable caching; bump run-vcpkg +7/-6

Gate vcpkg steps to vcpkg presets and enable caching; bump run-vcpkg

• Updates vcpkg cache-key computation, cache restore, vcpkg setup, and cache configuration steps to run only when the preset name contains "vcpkg". Upgrades lukka/run-vcpkg to v11.6 and enables its caching (doNotCache: false). Adjusts the cache save condition to remain single-writer while still restricted to vcpkg presets.

.github/workflows/build-toolchain.yml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@bobtista bobtista self-assigned this Aug 13, 2026
@bobtista bobtista added the Build Anything related to building, compiling label Aug 13, 2026

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok lets go

@xezon
xezon merged commit f1dda17 into TheSuperHackers:main Aug 13, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build Anything related to building, compiling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants