Externalise cache keys to prevent unneeded invalidation - #3922
Conversation
fdae3db to
4b51804
Compare
softins
left a comment
There was a problem hiding this comment.
Looks ok in general, just a couple of comments.
73de281 to
3f7be01
Compare
|
Well, it's not quite there, is it.... |
|
🤖 AI: The four former |
48e4892 to
081b45d
Compare
|
Well, the cache keys and cache creation are working now. ios appeared to be a bit flaky - consistently failing to create the cache. I did a straight rerun under debug and... it worked. So I don't know why it wasn't working! I've yet to test bump-dependencies with the new scheme. It actually makes it a lot simpler: it's just maintaining the version files based on the available version numbers. Unfortunately I've not managed to get it to run at all on my repo (even for main). |
|
So I reran the iOS build to see if it used the cache: Oh well. But it does give useful information -- the other runs don't stick Qt under /opt, they use a project work directory. I'll see if I can get that working here, too. |
dd269f0 to
7d474a7
Compare
Short description of changes
I noticed whilst I've been working on
autobuild.shthat every change invalidates all the caches. Becauseautobuild.shitself is included in the cache key calculation. This change replaces that mechanism on macOS and Windows with am externalised list of dependencies. It adds the same mechanism to iOS, which lacked caching.Github cache clean up will remove unused cache entries with no need to have the cache consumer included in the cache key.
(My work in progress on the Android build uses the same approach, which is where this comes from.)
Scope, guidance, testing and review by myself, coding my VSCode Github CoPilot.
CHANGELOG: Build: improve cache persistence
Context: Fixes an issue?
Caching should depend on what is being cached, rather than the cache consumer.
Does this change need documentation? What needs to be documented and how?
No.
Status of this Pull Request
Tested against the current branch in my own repository before raising the PR here.
What is missing until this pull request can be merged?
Need to do some more testing.
Checklist
AUTOBUILD: Please build all targets