-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: CI/local S3 build cache (#8802)
What this PR achieves: Optional S3 caching in Earthly files with a 2nd layer of file caching (except in C). A future step would be to use this cache locally for fast bootstrapping. Currently implemented for barretenberg and noir. If AWS credentials are available with this script, S3 will be used as a download source. Otherwise, just the local minio cache will be used. If both are used, minio will act like a pull-through cache for S3 and provide a two-tiered caching solution good for when earthly is being really forgetful and you are using artifacts that have not changed in a while. USAGE NOTE: After this PR, you will want to run on scripts/setup-earthly-local.sh or equivalent if not using zsh. This will create an alias for earthly as earthly-local in the repo, which sets up scripts and starts the (currently always on) file server. USAGE NOTE: Because we use git to reliably make content hashes that aren't prone to changing due to temporary files, we require all changes to be committed before we content hashes will be used. The cache will not be used at all if there are staged changes. Taking feedback on this. I recommend doing something like `git commit -am 'sync' && earthly ...` if changing files in a loop (possibly with --amend). Remember to `git add` new wanted files or you may get old cache. USAGE NOTE: If you do not want AWS secrets in the env for every program you can figure out your own wrapper alias, perhaps reading from files EARTHFILE DEV NOTE: There is a little bit of a dance to grab rebuild patterns and run with the git context on the local machine. To enable this, WORKDIR needs to match the repo layout, some adjustments thusly Bundled: - Just make build the root of the dependency tree in github. This should fix a lot of contention issues Followups: - Cache protocol circuits and verification keys
- Loading branch information
Showing
22 changed files
with
670 additions
and
310 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
^avm-transpiler/.*$ |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.