This repository has been archived by the owner on Oct 13, 2023. It is now read-only.
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.
Use GitHub Actions cache for installed binaries #5
base: master
Are you sure you want to change the base?
Use GitHub Actions cache for installed binaries #5
Changes from 4 commits
40cec18
981bb2e
0d51c02
9f5d8b9
57e52b9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is a good idea to force users to provide all necessary cache keys, as Action can do that by itself; grab the crate name, version and current runner name (ex.
ubuntu-18.04
), join them together - we got a cache key.That also mean that we will need to use
resolveVersion
if there is no version specifically set in the Action arguments or set to"latest"
, for example.Ideally, from the user side I would expect to write
and it will handle all the stuff by itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thought behind adding those keys was that there is currently no way to force-update a cache. If a new cache should be created, the cache has to get a new name. With
actions/cache
in rust projects, this is for example done by hashing theCargo.lock
files.But when caching binaries I guess only naming the hash with the version number should do the trick. There should be no need to add a hash to the cache name.
Should I remove the keys completely or should I just make them optional?
The part with resolving the version is already implemented. But I still have to add the runner name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@svartalf Do you have a suggestion how I might get the name of the runner? I looked at the
@actions/github
and@actions/core
package, but couldn't find any functions with which I'm able to access the runner name.If we're able to get the runner name $somehow, we can get rid of the
key
/restoreKeys
arguments of the action and go back touseCache
. This change has to be implemented inactions-rs/core
though.