This repository has been archived by the owner on Nov 16, 2024. It is now read-only.
Use Github actions cache for caching snaphots instead of an external server #302
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! This action is really useful, however sadly it seems to me that it no longer works, since the external server used to store the computed snapshots seems to be offline. This would probably happen sooner or later with any server, so I tried to create a PR that completely removes the reliance on any external server.
When a push event occurs, a snapshot is computed and then stored into the github actions cache.
When a pull request event occurs, the reference snapshot is:
Even if there is no cache hit, the reference snapshot recomputation will be usually quite fast, because the crate was already pre-built when the PR snapshot was computed, so typically there will not be too many changes that need to be compiled.
The code currently assumes that the workflow uses the checkout action, which is true for most workflows I suppose.
You can see the modified version in action here.