Skip to content

chore(ci): create reusable GitHub Actions composite action for ecosystem vcpkg setup#511

Merged
kcenon merged 1 commit into
mainfrom
chore/vcpkg-composite-action
Mar 24, 2026
Merged

chore(ci): create reusable GitHub Actions composite action for ecosystem vcpkg setup#511
kcenon merged 1 commit into
mainfrom
chore/vcpkg-composite-action

Conversation

@kcenon

@kcenon kcenon commented Mar 24, 2026

Copy link
Copy Markdown
Owner

What

Create a shared GitHub Actions composite action at .github/actions/setup-vcpkg/ that standardizes vcpkg bootstrap, version pinning, and caching across all kcenon ecosystem CI workflows.

New Files

File Purpose
.github/actions/setup-vcpkg/action.yml Composite action definition
.github/actions/setup-vcpkg/README.md Usage documentation and examples

Action Features

Feature Description
Pinned checkout Pins vcpkg to ecosystem baseline commit by default
Intelligent cache Cache key includes OS, commit, manifest hashes
Cross-platform Works on Ubuntu, macOS, Windows runners
Environment setup Sets VCPKG_ROOT and CMAKE_TOOLCHAIN_FILE

Why

  • Ecosystem CI workflows use 3 different patterns for vcpkg setup, with duplicated logic
  • Most Pattern A projects clone vcpkg from HEAD, causing version drift from the declared baseline
  • A single bug in cache key logic must be fixed in 6+ repos individually
  • Centralizing setup ensures all projects use the same pinned baseline

Where

  • .github/actions/setup-vcpkg/action.yml — composite action
  • .github/actions/setup-vcpkg/README.md — documentation

How

Created a composite action that:

  1. Clones microsoft/vcpkg at a pinned commit (default: ecosystem baseline d90a9b15...)
  2. Bootstraps vcpkg with metrics disabled
  3. Sets VCPKG_ROOT and CMAKE_TOOLCHAIN_FILE as environment variables
  4. Caches the vcpkg directory (excluding buildtrees/packages/downloads)

Other repos can adopt this via:

- uses: kcenon/common_system/.github/actions/setup-vcpkg@main

Closes #510
Part of #509

…tem vcpkg setup

Add a shared composite action that bootstraps vcpkg pinned to the
ecosystem baseline commit with intelligent caching. Eliminates
duplicated vcpkg setup logic across ecosystem CI workflows and
prevents version drift from unpinned HEAD clones.
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.

chore(ci): create reusable GitHub Actions composite action for ecosystem vcpkg setup

1 participant