Skip to content

chore(ci): adopt setup-vcpkg composite action across ecosystem CI workflows #512

@kcenon

Description

@kcenon

What

Migrate ecosystem CI workflows from inline vcpkg setup logic to the reusable composite action created in PR #511 (.github/actions/setup-vcpkg/).

Current State

All projects that use vcpkg in CI still duplicate 15-30 lines of setup logic (clone, bootstrap, cache, toolchain path). The composite action exists but is not yet adopted.

CI Pattern Projects Inline Setup Lines
A: vcpkg manifest mode logger, monitoring, network, messaging ~25 lines each
B: System packages only common, thread, container, database N/A
C: Mixed/special pacs_system, pacs_bridge, dicom_viewer ~20 lines each

Target State

Pattern A and C projects replace inline vcpkg setup with:

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

Why

  • Duplicated vcpkg setup logic across 6+ repos creates maintenance burden
  • Inline setups clone vcpkg from HEAD (unpinned), while the composite action pins to the ecosystem baseline commit by default
  • Cache key strategies differ across repos; the action standardizes this
  • A bug fix in setup logic currently requires 6+ separate PRs

Where

Project CI File Inline Setup Location
logger_system .github/workflows/ci.yml vcpkg clone/bootstrap steps
monitoring_system .github/workflows/ci.yml Lines ~148-169
network_system .github/workflows/ci.yml vcpkg setup steps
messaging_system .github/workflows/ci.yml vcpkg setup steps
pacs_system .github/workflows/ci.yml Mixed checkout actions
pacs_bridge .github/workflows/ci.yml Manual vcpkg clone
dicom_viewer .github/workflows/ci.yml Homebrew + manual setup

How

Rollout Plan

Phase Scope Risk
1 Pilot in one Pattern A project (e.g., logger_system) Low
2 Roll out to remaining Pattern A projects Low
3 Adapt for Pattern C projects (may need manifest-dir input) Medium

Migration Template

Replace inline vcpkg steps:

# Before (inline)
- name: Clone vcpkg
  run: git clone https://github.com/microsoft/vcpkg.git
- name: Bootstrap vcpkg
  run: ./vcpkg/bootstrap-vcpkg.sh
- name: Cache vcpkg
  uses: actions/cache@v4
  ...

# After (composite action)
- uses: kcenon/common_system/.github/actions/setup-vcpkg@main
  with:
    extra-cache-key: 'logger-system'

Acceptance Criteria

  • At least one Pattern A project migrated to composite action
  • CI passes on all platforms after migration
  • Inline vcpkg setup lines removed from migrated workflow
  • Cache hit rate maintained or improved
  • Document migration steps for remaining projects

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions