Repository navigation
ci: reduce GitHub Actions cache and artifact storage - #48
Merged
Merged
Conversation
Only main saves the npm cache now, through a shared composite action. Pull requests, release branches and tags only restore it. The runtime archive artifact is kept for one day, because only the same run uses it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The repository used 4.3 GB of Actions cache (63 entries) and 960 MB of artifacts.
setup-nodejob withcache: npmsaved a 65 MB npm cache per OS, per lockfile hash and per ref. Caches saved onrefs/pull/N/merge,release/v*and tags cannot be read frommainor other pull requests, so about 3 GB of the 4.3 GB was never reused. A version bump changespackage-lock.json, so every release also created a new cache for all five OSes.zcode-runtimearchive artifact (79 MB) was kept for the default 90 days, although only the same run uses it.Changes
.github/actions/setup-node-deps, which sets up Node.js, restores the npm cache, runsnpm ci --include=devand saves the cache only onmainwhen the key missed. Other refs restore it and fall back to an oldermaincache throughrestore-keys.mainsaves only exact keys, so its cache does not keep tarballs of replaced dependencies.cache: npm: CI (test, runtime matrix, E2E), both release checks and the ZCode runtime verification matrix. In the verification matrix, dependencies are now installed before the archive is extracted.zcode-runtimeartifact for one day. Tags still publish the archive as a release asset..github/actionsinformat/format:check.docs/development.md.Expected steady state is one npm cache per OS on
main(about 330 MB). The existingnode-cache-*entries onmainstop being used after this merges and expire after seven days without access.Repository changes already applied
These are not part of the diff:
mainwere deleted. Cache usage is now 1.3 GB (20 entries onmain).Verification
actionlintandnpm run format:checkpass locally.