vcpkg-action GitHub action #25768
johnwason
started this conversation in
Show and tell
Replies: 1 comment 5 replies
-
Great work. This looks almost as what I need, it lacks only 3 features:
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created a simple GitHub action designed to accurately cache packages by using a "dry-run" build to generate an accurate list of packages and package versions. The dry-run is hashed as part of the cache restore key, so the cache will always accurately reflect the packages that need to be built.
https://github.com/johnwason/vcpkg-action
More details:
vcpkg-action
is a simple action to build and cache vcpkg packages. It supports all platforms. It has two uniquefeatures:
change, the cache will be rebuilt, but avoids rebuilding when it isn't necessary.
vcpkg.json
manifest filesvcpkg
is cloned to the${{ github.workspace }}\vcpkg
directory, and the build products are located in${{ github.workspace }}\vcpkg\installed\<triplet>
. For cmake, use the option:An output
vcpkg-cmake-config
is also created to simplify setting cmake configuration settings. Example usage:Include other configuration settings as normal in the cmake command. The vcpkg-action step must have the id
vcpkg
.Another directory named
vcpkg_cache
is created in the workspace root. This directory is used to store the cache files,and is cached using
pat-s/always-upload-cache@v3
. The cache key is automatically generated,but can also be modified using the
cache-key
argument.Simple usage example:
Simple manifest example:
Usage
Advanced Example
The following is an advanced example with a matrix build. Note that the runner name is included as an additional
cache key.
Beta Was this translation helpful? Give feedback.
All reactions