Open VladimirUmek opened 4 months ago
Note that separate cache save action is now available, see README.md
Not sure if we could split the cache into separate Restore and Save actions to achieve this.
The run_id
part of the cache key might still be required because we still could have concurrent runs to Save the cache.
We'd just need to know if the cache requires update. We could try to inspect what vcpkg activate
was doing. I.e., if it fetched and installed any new artifact (or version) the cache should be updated. In the same go, we could try to clean old versions from the cache before saving. This might need a bit of investigation work.
Looking at the used cache key https://github.com/ARM-software/cmsis-actions/blob/f608f32a6d83e90d79e1f2bbb7812fdb94bf1679/vcpkg/action.yml#L26
I'm wondering whether we could get rid of _github.run_id? Using run_id_ as an end result, fills the cache storage. We could optimize this and use single cache entry until it is required to change it.
My initial idea was to check whether the content of vcpkg-configuration.json is changed by hashing it:
This approach might not be fully accurate because at one of subsequent activations latest packages could be downloaded while vcpkg configuration still remains the same. I'm not sure whether we can overcome this limitation?