8000 GitHub - TAServers/vcpkg-cache: Caches filesystem vcpkg archives using actions/cache
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TAServers/vcpkg-cache

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

vcpkg Dependency Caching using GHA

Simple Node-based GitHub action to regain per-package caching using GitHub Actions.

- uses: TAServers/vcpkg-cache@v3
  with:
    token: ${{ secrets.GITHUB_TOKEN }}

Inputs:

  • token: GitHub workflow token used by @actions/github to get the list of cache entries for the given prefix
  • (optional) prefix: Prefix added to cache keys to determine which cache entries to restore. Defaults to vcpkg/

Outputs:

  • path: Absolute path to the restored cache (to be passed to vcpkg)

Uses the official @actions/cache NPM package under the hood to ensure compatibility with any breaking API changes 😉.

Usage

Add the actions: read permission to the workflow token:

permissions:
  actions: read
  contents: read # Usually enabled by default. Needed for checkout

Add TAServers/vcpkg-cache to your workflow before you run CMake configure (or whatever triggers your vcpkg install):

- name: Restore vcpkg cache
  id: vcpkg-cache
  uses: TAServers/vcpkg-cache@v3
  with:
    token: ${{ secrets.GITHUB_TOKEN }}

Tell vcpkg to use the restored directory for binary caching:

- name: CMake Configure
  env:
    VCPKG_FEATURE_FLAGS: "binarycaching" # Possibly redundant, but explicitly sets the binary caching feature flag
    VCPKG_BINARY_SOURCES: "clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite"
  run: # Run cmake configure (or if you install vcpkg packages earlier, add the env var there

About

Caches filesystem vcpkg archives using actions/cache

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •  
0