Replies: 8 comments
-
A Github Actions attempt to store/restore the archives that does not work with vcpkg.
Instead of |
Beta Was this translation helpful? Give feedback.
-
Do you use the master branch of vcpkg or a specific commit? |
Beta Was this translation helpful? Give feedback.
-
master branch,
|
Beta Was this translation helpful? Give feedback.
-
Then you will get cache misses all the time. Use a specific commit and you don't get cache misses |
Beta Was this translation helpful? Give feedback.
-
The main issue is, that I cannot find what set of the archives to restore before running the vcpkg install. When I restore the set from previous vcpkg run and vcpkg decides that it will not use the set I have no control over vcpkg to stop it, clear archives and run it to create a new set of binaries. vcpkg will just copy the new binaries to the archive from the previous run. That just bloats the set indefinitely. |
Beta Was this translation helpful? Give feedback.
-
vcpkg.json
This ensures there are no misses because of the new vcpkg commits. |
Beta Was this translation helpful? Give feedback.
-
To ensure that the thread is clear, let me recap. I have been using the |
Beta Was this translation helpful? Give feedback.
-
Patch and usage, |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
vcpkg to be usable in CI/CD pipelines like Github Actions, we need to be able to effectively store the cached binaries placed to archives folder. To restore content of the archives folder before running
vcpkg install
we need to know what is the hash that vcpkg is going to use so that we can ask CI/CD to restore content of the archives folder that vcpkg is going to use.Many times vcpkg ignores the archives, does not restore the binaries, builds new ones and copies the binaries over to the archives folder that contains the previous built, effectively spoiling a chance to store/restore the new built. vcpkg ignores the archives because during the run it detects that some of the many data it uses to calculate the hash has changed.
We need to be able to ask vcpkg for a single hash that will be used by vcpkg to determine if the archive cache binaries will be used. We can use this hash key to ask CI/CD provider's cache to restore the correct binaries.
Proposed solution
Add a parameter that prints a hash, based on triplet hash and other information, that is used to determine if vcpkg is going to use the cached binaries in the archives folder.
Describe alternatives you've considered
First, we determined the cache key used with the CI/CD by calculating hash sum of the vcpkg.json. That is not enough since vcpkg takes into account many other information that is not clear or difficult to calculate the same way as vcpkg does.
Also tried
VCPKG_DISABLE_COMPILER_TRACKING=1
.Beta Was this translation helpful? Give feedback.
All reactions