Skip to content

chore(ci): adopt setup-vcpkg composite action#244

Merged
kcenon merged 1 commit intomainfrom
chore/issue-512-adopt-setup-vcpkg-composite-action
Mar 24, 2026
Merged

chore(ci): adopt setup-vcpkg composite action#244
kcenon merged 1 commit intomainfrom
chore/issue-512-adopt-setup-vcpkg-composite-action

Conversation

@kcenon
Copy link
Copy Markdown
Owner

@kcenon kcenon commented Mar 24, 2026

What

Migrate messaging_system CI workflow from inline vcpkg setup logic to the reusable
composite action at kcenon/common_system/.github/actions/setup-vcpkg/.

Change Type

  • Chore (CI/CD maintenance)

Affected Components

  • .github/workflows/ci.yml — vcpkg setup steps in the build job

Why

Problem Solved

The inline vcpkg setup duplicates 54 lines of clone/bootstrap/cache logic that is
already encapsulated in the ecosystem composite action. This creates maintenance
burden — a bug fix in setup logic would require separate PRs in each repo.

Related Issues

Benefits

  • Pins vcpkg to ecosystem baseline commit (previously cloned from HEAD)
  • Standardizes cache key strategy across repos
  • Reduces CI workflow from ~310 lines to ~260 lines
  • Future vcpkg setup changes only need one PR (in common_system)

Where

Files Changed

File Lines Changed Type of Change
.github/workflows/ci.yml +6 / -54 Replace inline vcpkg with composite action

Specific Changes

  1. Removed 5 inline steps: Cache vcpkg, Setup Unix/Windows, Determine commit Unix/Windows
  2. Added 1 composite action step: kcenon/common_system/.github/actions/setup-vcpkg@main
  3. Updated vcpkg binary path to ${{ env.VCPKG_ROOT }}/vcpkg
  4. Updated Windows CMake toolchain to ${{ env.CMAKE_TOOLCHAIN_FILE }}
  5. Simplified vcpkg_installed cache key (removed dynamic commit hash)

How

Implementation Details

The composite action handles:

  • Caching vcpkg directory with proper exclusions (buildtrees, packages, downloads)
  • Cloning vcpkg pinned to ecosystem baseline commit d90a9b15
  • Bootstrapping vcpkg (cross-platform)
  • Setting VCPKG_ROOT and CMAKE_TOOLCHAIN_FILE environment variables

The build-without-network job is unchanged — it does not use vcpkg.

Test Plan

  • CI passes on all 3 platforms (Ubuntu, macOS, Windows)
  • vcpkg cache is restored correctly
  • vcpkg_installed packages cache works
  • Build and tests succeed as before

Breaking Changes

None — only CI infrastructure change, no source code modifications.

Replace inline vcpkg clone/bootstrap/cache steps (54 lines) with the
reusable composite action from kcenon/common_system/.github/actions/setup-vcpkg.

Changes:
- Remove 5 inline vcpkg setup steps (Cache, Setup Unix/Windows, Determine commit)
- Add single composite action step with project-specific cache key
- Update vcpkg binary path to use VCPKG_ROOT env var
- Update Windows CMake toolchain to use CMAKE_TOOLCHAIN_FILE env var
- Simplify vcpkg_installed cache key (pinned commit via action removes need for dynamic hash)

Part of kcenon/common_system#512
@kcenon kcenon merged commit 578a9d4 into main Mar 24, 2026
12 checks passed
@kcenon kcenon deleted the chore/issue-512-adopt-setup-vcpkg-composite-action branch March 24, 2026 20:37
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