Comments (6)
That's already possible?
from flatpak-github-actions.
Hmm.... I do not see a restore-key
or restore-keys
option in https://github.com/bilelmoussaoui/flatpak-github-actions/blob/master/flatpak-builder/action.yml. To be clear, I'm not referring to restoring the value of cache-key
, I'm talking about have a prefix key that can be restored from if no cache matching cache-key
exists.
Here is an example of that when using the actions/cache
action: https://github.com/rkoesters/xkcd-gtk/blob/master/.github/workflows/ci.yml#L46-L47. In that case, the action first tries to find a cache matching key
(${{ env.GOVERSION }}-${{ hashFiles('**/go.sum') }}
), this is equivalent to cache-key
in the flatpak-builder action. If that does not exist, it then looks for a cache matching the restore-keys
prefixes (${{ env.GOVERSION }}-
).
It appears that the cache package that your action uses supports this behavior, all you would need to do is pass that user supplied value: https://github.com/actions/toolkit/blob/main/packages/cache/README.md
Thanks!
from flatpak-github-actions.
What's the use case here?
from flatpak-github-actions.
The use-case is to leverage the cache to try and speed up builds. If a cache doesn't exist for the exact cache-key
provided, then the workflow can load an existing cache that matches the restore-key
prefix. This eliminates the need to freshly download each dependency for each workflow build (for git sources this means the git pull
just verifies there is nothing new to download; if there are changes, it just needs to download the deltas).
In theory, it could also be used to avoid recompiling bits of code that have not changed, however that would be build system specific, so I'd say its a bit out of scope for this request.
from flatpak-github-actions.
I mean that's what cache-key
option provides for you already. The restore keys are hardcoded to the flatpak-builder-
& flatpak-
along with the cache-key
that you define. The reason why we allow you to set one is because the action keeps complaining that an action already defined this cache key which is completely wrong (an issue is already open on the cache action side) and we suggest people to assign it to flatpak-$git-commit-sha
to avoid the issue.
I don't see what else we should provide
from flatpak-github-actions.
I am going to assume the latest releases should cover everything you might need for improving caching. Please re-open if that is not the case
from flatpak-github-actions.
Related Issues (20)
- Action suddenly started to fail HOT 11
- Don't use static deltas option HOT 1
- how to export other software in the repo folder,By default, you can only export one
- Building for KDE 6.4 runtime and aarch64 architecture results in errors HOT 2
- Does cache work? HOT 30
- "Smudge error" cloning gst-integration-tests
- Restoring cache of the wrong `arch` HOT 1
- Fedora providing unstable flatpak-builder is triggerring issues HOT 2
- Error CI/CD: Cannot change ownership
- What does the `branch` input do? HOT 1
- Add support for `build-export --subject=foo` HOT 1
- Aarch64 builder image
- How to GPG sign builds?
- Keep on getting this error with disk space
- Build failed with no useful infomation HOT 3
- Migration to upload-artifact version 4 HOT 1
- How use this with submodules ? HOT 1
- Build failed on export HOT 2
- Add option to run flatpak-builder-lint after build HOT 2
- Can not access network in flatpak docker HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flatpak-github-actions.