Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): cache build objects in between internal runs #504

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

Rexicon226
Copy link
Contributor

@Rexicon226 Rexicon226 commented Jan 17, 2025

This PR consolidates and caches the Sig artifacts created by our CI process to be shared across jobs. Before, each job would set up Zig and the associated cache, which would result in around 1.5GB of cache usage per job. This quickly spiraled out of control and ended up using hundreds of GBs of cache.

The changes here create 3 main jobs for building Zig.

  • build - This job builds Sig with and without TSAN, as well as a version of the tests which use the hashmap blockstore.
  • build-release - This job builds Sig and the fuzzer in ReleaseSafe. Since all of the dependencies need to be built in ReleaseSafe as well, it has a separate cache to minimize duplication.
  • build-macos - This job uses an ubuntu runner to build Sig targeting aarch64-macos. I've set this up as a separate job for the same reason as the build-release one, as well as for the future when we will hopefully have a functional MacOS runner.

Another improvement I've made is creating a small Action that handles setting up and restoring the artifacts. It's located in .github/actions/setup/action.yml and just deduplicates a lot of similar step usages in the main check.yml.

All in all, the cache usage has gone from around 9GB to 1.3GB per "PR", which should stop Github from complaining in most cases, unless we have a lot of PRs open at once.

As for the CI times, after caching, the new approach less or a similar amount of time. The main improvement there is that we're not building Sig for each of the fuzzer tests.

@Rexicon226 Rexicon226 force-pushed the Rexicon226/cache-ci branch 2 times, most recently from 36a8cf6 to 9964a81 Compare January 17, 2025 00:54
@Rexicon226 Rexicon226 changed the title ci: cache build objects in between internal runs feat(ci): cache build objects in between internal runs Jan 17, 2025
@Rexicon226 Rexicon226 force-pushed the Rexicon226/cache-ci branch 22 times, most recently from aa1d377 to bd0de34 Compare January 17, 2025 03:32
@Rexicon226 Rexicon226 enabled auto-merge (squash) January 21, 2025 18:48
@Rexicon226 Rexicon226 merged commit 1d6661f into main Jan 21, 2025
12 checks passed
@Rexicon226 Rexicon226 deleted the Rexicon226/cache-ci branch January 21, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants