Skip to content

ci: enable vcpkg binary caching for Windows build#138

Merged
DavidCozens merged 1 commit into
mainfrom
ci/vcpkg-binary-cache
Apr 15, 2026
Merged

ci: enable vcpkg binary caching for Windows build#138
DavidCozens merged 1 commit into
mainfrom
ci/vcpkg-binary-cache

Conversation

@DavidCozens

@DavidCozens DavidCozens commented Apr 15, 2026

Copy link
Copy Markdown
Owner

Purpose

Speed up the Windows CI job by caching compiled vcpkg packages.

Change Description

Enable vcpkg's built-in GitHub Actions binary cache (x-gha). The vcpkg install cpputest step currently builds CppUTest from source on every run (~2 minutes). With binary caching, the first run populates the cache and subsequent runs pull pre-built binaries in seconds.

Uses actions/github-script to export the required ACTIONS_CACHE_URL and ACTIONS_RUNTIME_TOKEN environment variables, following vcpkg's recommended approach.

Test Evidence

No code changes — CI-only. The first run on this PR will populate the cache (same speed as before). The speedup will be visible on subsequent runs.

Areas Affected

.github/workflows/ci.ymlwindows-build-and-test job only.

Summary by CodeRabbit

  • Chores
    • Enhanced Windows CI pipeline efficiency through optimized binary caching, enabling faster and more reliable build processes.

Use vcpkg's built-in GitHub Actions binary cache (x-gha) to avoid
rebuilding CppUTest from source on every CI run. First run populates
the cache; subsequent runs pull pre-built binaries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 508f0193-2027-4e95-bbc9-611d8af4da52

📥 Commits

Reviewing files that changed from the base of the PR and between 8dd04f4 and add2678.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

The Windows CI job in the GitHub Actions workflow is enhanced with vcpkg binary caching support by adding a job-level environment variable and a new step that exports cache-related credentials from the GitHub Actions environment.

Changes

Cohort / File(s) Summary
Workflow CI Configuration
.github/workflows/ci.yml
Added VCPKG_BINARY_SOURCES environment variable to Windows CI job and introduced a github-script step to export cache URL and runtime token for enabling vcpkg binary caching.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through GitHub Actions fine,
With vcpkg caching, builds will shine,
The cache flows swift, no rebates lost,
Windows CI speeds up, worth the cost!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: enabling vcpkg binary caching for Windows CI builds.
Description check ✅ Passed The description provides all required sections (Purpose, Change Description, Test Evidence, Areas Affected) with clear, specific information matching the actual changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/vcpkg-binary-cache

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   Unit Tests (GCC): 99% successful (✔️ 479 passed, 🙈 3 skipped)
   🚦   Unit Tests (Clang): 99% successful (✔️ 446 passed, 🙈 3 skipped)
   🚦   Unit Tests (Sanitize): 99% successful (✔️ 446 passed, 🙈 3 skipped)
   🚦   BDD Tests: 100% successful (✔️ 31 passed)
   🚦   Unit Tests (MSVC): 100% successful (✔️ 338 passed, 🙈 1 skipped)
   ⚠️   Clang-Tidy: No warnings
   ⚠️   CPPCheck: No warnings


Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result.

@github-actions

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   Unit Tests (GCC): 99% successful (✔️ 479 passed, 🙈 3 skipped)
   🚦   Unit Tests (Clang): 99% successful (✔️ 446 passed, 🙈 3 skipped)
   🚦   Unit Tests (Sanitize): 99% successful (✔️ 446 passed, 🙈 3 skipped)
   🚦   BDD Tests: 100% successful (✔️ 31 passed)
   🚦   Unit Tests (MSVC): 100% successful (✔️ 338 passed, 🙈 1 skipped)
   ⚠️   Clang-Tidy: No warnings
   ⚠️   CPPCheck: No warnings


Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result.

@DavidCozens DavidCozens merged commit 8895485 into main Apr 15, 2026
23 checks passed
@DavidCozens DavidCozens deleted the ci/vcpkg-binary-cache branch April 15, 2026 21:28
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