Closed simonhamp closed 7 months ago
Previously I modified test workflow for dynamic caching: Just cache downlods dir again and again. When new extension added, it will automatically skip downloading other sources that has been cached.
Also, in some particularly rare cases, as long as cache-hit != 'true'
is used, the cache will not be hit, with no reason.
@crazywhalecc I'm not sure I follow you. The cache in these didn't appear to be working at all because the key name was incorrect. This had the result of always downloading the extension files.
This PR fixes that so each action will now correctly cache the set of extensions that were requested.
This should make builds of the same PHP-version+OS+extension set a little faster, at least during the cache's lifetime.
In case it's not clear, this dependency cache is the extension build files (the result of bin/spc download
).
I think the variance you were seeing in cache-hit != true
was exactly down to this problem of commas in the key name.
This is why I've hashed the details of the build into a key name that will never have commas regardless of how the build is configured.
What I mean is that today's best caching strategies don't perform well in Actions. It has nothing to do with this PR. After fixing this small problem, we merge it into the main branch and test it again.
What does this PR do?
This reduces errors and improves build times.
Checklist before merging
src/global/test-extensions.php
.config/xxxx.json
content, runbin/spc dev:sort-config xxx
.