cache icon indicating copy to clipboard operation
cache copied to clipboard

how to cache vcpkg installed?

Open shinny-jipeng opened this issue 5 years ago • 4 comments

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 your issue is relevant to this repository, please delete this text and continue to create this issue. Thank you in advance.

shinny-jipeng avatar Feb 12 '20 12:02 shinny-jipeng

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.

bsergean avatar Apr 25 '20 22:04 bsergean

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

giallu avatar Oct 18 '21 08:10 giallu

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.

bsergean avatar Oct 18 '21 15:10 bsergean

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

aminya avatar Oct 30 '21 08:10 aminya

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.

github-actions[bot] avatar Apr 23 '23 08:04 github-actions[bot]

This issue was closed because it has been inactive for 5 days since being marked as stale.

github-actions[bot] avatar Apr 28 '23 08:04 github-actions[bot]

This issue is open still. vcpkg build the dependencies again and again.

hks2002 avatar Mar 13 '24 10:03 hks2002