What
Create a shared, reusable GitHub Actions composite action that standardizes vcpkg bootstrap, version pinning, and caching across all kcenon ecosystem CI workflows.
Current CI Patterns (3 different approaches)
| Pattern |
Projects |
How vcpkg is set up |
| A: Manifest mode |
logger, monitoring, network, messaging |
Clone vcpkg from HEAD, bootstrap, CMAKE_TOOLCHAIN_FILE |
| B: System packages |
common, thread, container, database |
apt/brew/choco, no vcpkg |
| C: Mixed/special |
pacs_system, pacs_bridge, dicom_viewer |
Custom checkout actions, runner-preinstalled vcpkg, manual clone |
Key Problems
- Pattern A clones vcpkg from HEAD — the resolved vcpkg commit drifts from the declared baseline (
d90a9b159c... in vcpkg-configuration.json), breaking reproducibility
- Each repo duplicates 15-30 lines of vcpkg setup logic (clone, bootstrap, cache keys, toolchain path)
- Cache key strategies differ — some hash
vcpkg.json only, others hash vcpkg.json + vcpkg-configuration.json
- Only monitoring_system pins vcpkg to the baseline commit (in
validate-vcpkg-chain.yml using lukka/run-vcpkg@v11)
Why
- Non-reproducible builds: Two CI runs on the same commit can produce different results if microsoft/vcpkg main branch changes between them
- Maintenance cost: A vcpkg cache key bug must be fixed in 6+ repos individually
- Inconsistent behavior: Some repos use
vcpkg install --x-manifest-root=., others rely on CMake's VCPKG_MANIFEST_MODE
- Onboarding friction: New ecosystem repos must copy-paste and adapt CI setup from existing repos
Where
| File |
Change |
.github/actions/setup-vcpkg/action.yml |
Create composite action |
.github/actions/setup-vcpkg/README.md |
Create usage documentation |
Proposed Location
Host the composite action in kcenon/common_system (Tier 0 foundation), referenced by other repos as:
- uses: kcenon/common_system/.github/actions/setup-vcpkg@main
How
Technical Approach
- Create composite action with these inputs:
name: 'Setup vcpkg'
description: 'Bootstrap vcpkg pinned to ecosystem baseline with caching'
inputs:
vcpkg-commit:
description: 'vcpkg commit to checkout (default: ecosystem baseline)'
required: false
default: 'd90a9b159c08169f39adcd1b0f1ac0ca12c4b96c'
manifest-dir:
description: 'Directory containing vcpkg.json'
required: false
default: '.'
extra-cache-key:
description: 'Additional cache key suffix for project-specific differentiation'
required: false
default: ''
-
Action steps:
- Checkout
microsoft/vcpkg at the pinned commit
- Bootstrap vcpkg (
bootstrap-vcpkg.sh / bootstrap-vcpkg.bat)
- Set
VCPKG_ROOT and CMAKE_TOOLCHAIN_FILE environment variables
- Configure GitHub Actions cache with key:
vcpkg-{os}-{hash(vcpkg.json, vcpkg-configuration.json)}-{extra-cache-key}
-
Outputs:
vcpkg-root: Path to vcpkg installation
toolchain-file: Path to vcpkg.cmake
Rollout Plan
| Phase |
Scope |
| 1 |
Create action in common_system, validate in common_system CI |
| 2 |
Adopt in one Pattern A project (e.g., logger_system) |
| 3 |
Roll out to remaining Pattern A and C projects |
Acceptance Criteria
Related
What
Create a shared, reusable GitHub Actions composite action that standardizes vcpkg bootstrap, version pinning, and caching across all kcenon ecosystem CI workflows.
Current CI Patterns (3 different approaches)
HEAD, bootstrap,CMAKE_TOOLCHAIN_FILEapt/brew/choco, no vcpkgKey Problems
d90a9b159c...invcpkg-configuration.json), breaking reproducibilityvcpkg.jsononly, others hashvcpkg.json + vcpkg-configuration.jsonvalidate-vcpkg-chain.ymlusinglukka/run-vcpkg@v11)Why
vcpkg install --x-manifest-root=., others rely on CMake'sVCPKG_MANIFEST_MODEWhere
.github/actions/setup-vcpkg/action.yml.github/actions/setup-vcpkg/README.mdProposed Location
Host the composite action in
kcenon/common_system(Tier 0 foundation), referenced by other repos as:How
Technical Approach
Action steps:
microsoft/vcpkgat the pinned commitbootstrap-vcpkg.sh/bootstrap-vcpkg.bat)VCPKG_ROOTandCMAKE_TOOLCHAIN_FILEenvironment variablesvcpkg-{os}-{hash(vcpkg.json, vcpkg-configuration.json)}-{extra-cache-key}Outputs:
vcpkg-root: Path to vcpkg installationtoolchain-file: Path tovcpkg.cmakeRollout Plan
Acceptance Criteria
.github/actions/setup-vcpkg/action.ymlvcpkg.jsonandvcpkg-configuration.jsonhashesVCPKG_ROOTandCMAKE_TOOLCHAIN_FILERelated
validate-vcpkg-chain.yml(already pins vcpkg vialukka/run-vcpkg@v11)