Skip to content

Use NuGet for vcpkg binary cache#347

Draft
huangminghuang wants to merge 11 commits into
masterfrom
codex/vcpkg-nuget-binary-cache
Draft

Use NuGet for vcpkg binary cache#347
huangminghuang wants to merge 11 commits into
masterfrom
codex/vcpkg-nuget-binary-cache

Conversation

@huangminghuang
Copy link
Copy Markdown
Contributor

@huangminghuang huangminghuang commented May 19, 2026

Why

  • CI and local developer builds should use the same vcpkg binary-cache setup so cache misses are easier to diagnose and reproduce.
  • Developers should be able to run the cache-aware build once, then continue building from an IDE through CMake preset support without re-entering GitHub Packages/vcpkg environment details.
  • vcpkg dependencies should be release-only by default to avoid rebuilding large third-party packages, while still allowing a Debug build of Wire Sysio itself.
  • Fork PRs must avoid package credentials while still having a working vcpkg cache configuration.

Summary

  • replace the local actions/cache-backed vcpkg binary cache with GitHub Packages NuGet cache
  • add a shared scripts/build-with-github-vcpkg-cache.sh helper for CI/developer cache setup, CMake configure, build, optional tests, and developer CMakeUserPresets.json generation
  • add CMake presets for GitHub-backed release builds, Debug-with-release-vcpkg-deps builds, trusted CI, and fork PR local-cache builds
  • add an x64-linux-release vcpkg triplet so vcpkg packages build release-only by default
  • update the reusable build workflow to call the shared helper in trusted CI or forked PR mode
  • install Mono in the CI platform images so vcpkg can run NuGet on Linux
  • disable vcpkg metrics in CI and grant package write permissions for trusted cache publishing

Validation

  • parsed modified workflow YAML files with PyYAML
  • validated scripts/build-with-github-vcpkg-cache.sh with bash -n
  • validated CMake preset parsing with cmake --list-presets=all and cmake --preset ... -N
  • smoke-tested generated developer user preset shape with dev-release / dev-debug
  • checked invalid --jobs and conflicting --mode / --preset handling
  • CI draft PR is intended to validate NuGet restore/publish behavior across platform images

Notes

  • developer mode writes short IDE-friendly user presets: dev-release and dev-debug
  • --build-dir is a build prefix in developer mode, but remains the exact artifact build directory in CI modes
  • local Docker build acceleration is intentionally left for a follow-up PR so this change stays focused on CI vcpkg caching

@huangminghuang huangminghuang marked this pull request as ready for review May 19, 2026 21:31
@huangminghuang huangminghuang marked this pull request as draft May 19, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant