how to cache vcpkg installed?
Thank you 🙇♀ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.
- If you have found a security issue please submit it here
- If you have questions about writing workflows or action files, then please visit the GitHub Community Forum's Actions Board
- If you are having an issue or question about GitHub Actions then please contact customer support
If your issue is relevant to this repository, please delete this text and continue to create this issue. Thank you in advance.
I would love to get vcpkg installed deps to be cached. It takes forever to build OpenSSL for example, and I'd love to not do this every time I build.
Did you find a solution? I am in the process of adding vcpkg to my builds and wondering how to avoid rebuilding deps over and over
I actually never looked into this, but maybe it could work with vcpkg, it's just that no-one ever tried or wrote doc for it. This cache system looks generic, you need to provide a key, a path and a 'rebuild-thing' values.
https://github.com/actions/cache/blob/main/examples.md#python---pip is an example for python.
I don't know where vcpkg puts its output files.
Can't we use something like this:
- name: Cache
uses: actions/cache@v2
with:
path: |
~/vcpkg
./build/vcpkg_installed
${{ env.HOME }}/.cache/vcpkg/archives
${{ env.XDG_CACHE_HOME }}/vcpkg/archives
${{ env.LOCALAPPDATA }}\vcpkg\archives
${{ env.APPDATA }}\vcpkg\archives
key: ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}}
restore-keys: |
${{ runner.os }}-${{ env.BUILD_TYPE }}
Assuming vcpkg is installed in ~/vcpkg.
The archives paths are based on these: https://github.com/microsoft/vcpkg/blob/master/docs/specifications/binarycaching.md#backend-1-file-based-archives https://vcpkg.io/en/docs/users/binarycaching.html#configuration
This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.
This issue was closed because it has been inactive for 5 days since being marked as stale.
This issue is open still. vcpkg build the dependencies again and again.