Skip to content

[CI] vcpkg cache misses cause ~1h cold rebuilds #51

Description

@patryk-przybysz

Problem

Agent CI sometimes takes ~1 hour even when sources/agent/vcpkg.json is unchanged. Fast runs (~2 min) restore the cache; slow ones rebuild deps from source during CMake Configure (grpc alone ~49 min).

Cause

  1. x-gha binary cache is gone - workflow sets VCPKG_BINARY_SOURCES=clear;x-gha,readwrite, but vcpkg removed that backend (~Apr 2025). Logs warn: "The 'x-gha' binary caching backend has been removed."
  2. actions/cache misses the real binary cache dir - lukka/run-vcpkg puts packages under a per-run UUID path (VCPKG_DEFAULT_BINARY_CACHE), while we only cache ~/.cache/vcpkg + sources/agent/build/vcpkg_installed.
  3. Eviction / branch scope - unused caches expire after 7 days; PR vs base/default branch visibility can miss the same key. Repo often ends up with 0 active caches after quiet periods.

Proposed fix

  • Drop x-gha.
  • Use a fixed VCPKG_DEFAULT_BINARY_CACHE and cache that with actions/cache.
  • Optionally add NuGet → GitHub Packages for a durable shared binary cache across branches.

Refs

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions