Skip to content

Commit d682ef0

Browse files
authored
Enable vcpkg cache via vcpkg-cache-action (#584)
- a new GitHub Action is introduced to provide vcpkg binary caching via a custom HTTP server that proxies to GitHub Actions cache - the result is granular caching of vcpkg artifacts, dramatically reducing build times - the action is a typescript shim that invokes a Python script (this is so we can register a post step) - the shim is "built" via "npm build" and the resulting JavaScript is checked into source control (best practice for GitHub Actions) - the Python script is launched via pipx and uv (as uv itself is not installed on the GitHub Actions runners) - uv is invoked with the --locked option to ensure consistent dependency resolution - the bulk of the action is written in Python for cross-platform compatibility and fast startup times without requiring a separate compilation step - the Python script is responsible for both the main and post steps of the action and sets the VCPKG_BINARY_SOURCES environment variable accordingly
1 parent 959c99e commit d682ef0

File tree

13 files changed

+29549
-3
lines changed

13 files changed

+29549
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
lib/
2+
node_modules/
3+
__pycache__/
4+
.venv/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: vcpkg cache action
2+
description: GitHub Action to provide vcpkg binary caching via a custom HTTP server that proxies to GitHub Actions cache
3+
4+
runs:
5+
using: node24
6+
main: dist/index.js
7+
post: dist/index.js

0 commit comments

Comments
 (0)