i have a CI/CD system that consumes a lot of network bandwidth downloading git repositories from GitHub. this happens because the build system clears the SwiftPM cache (.swiftpm/cache/repositories
) after every build due to disk space limitations.
i’m interested in setting up some sort of manual SwiftPM cache management system to reduce the amount of data we need to download over the internet. the idea in my head right now is to archive the cloned dependencies after every build and persist them in some less-expensive proximate storage (e.g. S3 in the same region). then on the next build, the system would use its internal dependency metadata to repopulate the SwiftPM cache with the unarchived repositories to improve the hit ratio.
has anyone tried this before? if so, how did it go, and what worked/didn’t work for you?