Repository navigation
Make the CI caches smaller - #427
Merged
Merged
Conversation
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.
This PR cuts a full set of CI caches from 9.9 GB to about 6 GB, projected from local measurements. One set almost filled the repository's 10 GB limit, so when
Package.swiftorPackage.resolvedchanged, the old set and the new set competed for the space, and jobs missed the cache untilmainhad saved the new set. About 40 percent of a set was data that a cached build doesn't read: the 835 MB Metal toolchain download, SwiftPM's shared cache on Linux (which repeats.build/repositories), and, on macOS, the Git repositories in.build/repositoriesand the index store.The Swift 6.4 jobs now download the Metal toolchain in each run; in recent runs that took 5 to 7 seconds, against 13 to 23 seconds to restore it from the cache. All SwiftPM caches now hold only
.build, the macOS caches also leave out.build/repositories, and the macOS jobs build and test with--disable-index-store. The Linux jobs keep their repositories and index store, because SwiftPM fetches the repositories again on Linux when they're missing and test discovery on Linux reads the index store. The cache keys change from-spm-to-build-, so the first push tomainafter this saves a new set, and the old entries are no longer read and are evicted.