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

ci: speed up CI by up to 50% #11794

Merged
merged 1 commit into from
Sep 6, 2024
Merged

ci: speed up CI by up to 50% #11794

merged 1 commit into from
Sep 6, 2024

Conversation

smartcontracts
Copy link
Contributor

Introduces a number of improvements to CI that significantly reduce overal CI time by up to 50% of the previous time.

Following improvements have been made:

  • cannon-go-lint-and-test resource class changed to xlarge and parallelism is increased from 2 to 4, cutting down the time for this test from 10 minutes to about 4-5 minutes.
  • pnpm-monorepo is removed entirely and replaced with contracts-bedrock-build and build-devnet-allocs.
  • contracts-bedrock-build is run once with forge build and once with forge build --skip-tests so that any jobs that don't need to wait around for the tests to get built can get started 3-4 minutes earlier.
  • install-contracts-dependencies is cached inside of contracts-bedrock-build.
  • contracts-bedrock-tests is split over 4 parallel test runners to save ~2 minutes. We can save an additional few minutes if we properly record test timings for these tests. I will do this in a separate PR.
  • golang-build-cache was being used incorrectly, jobs actually get their own build caches now and the caches are updated when necessary.
  • cannon-prestate cache was broken because cannon and op-program were not being built, now it is actually cached properly.
  • contracts-bedrock check for Solidity build warnings is moved into contracts-bedrock-build to save time and avoid compiling the whole codebase twice.
  • snapshots-check gets a new added no-build option since we already built the contracts before it gets executed.

Introduces a number of improvements to CI that significantly
reduce overal CI time by up to 50% of the previous time.
Copy link
Contributor

semgrep-app bot commented Sep 6, 2024

Semgrep found 1 todos_require_linear finding:

  • op-supervisor/supervisor/backend/db/db.go

Please create a GitHub ticket for this TODO.

Ignore this finding from todos_require_linear.

@tynes
Copy link
Contributor

tynes commented Sep 6, 2024

@smartcontracts did we mean to remove the validate spacers as its own job? If so, this is good to merge

@smartcontracts
Copy link
Contributor Author

@smartcontracts did we mean to remove the validate spacers as its own job? If so, this is good to merge

Validate spacers just got renamed, whoops, the job was named incorrectly "validate-spaces"

@tynes tynes added this pull request to the merge queue Sep 6, 2024
Merged via the queue into develop with commit f954cbb Sep 6, 2024
62 checks passed
@tynes tynes deleted the sc/ci-speedup-extreme branch September 6, 2024 23:41
@clabby
Copy link
Member

clabby commented Sep 7, 2024

symbolic approval, @tynes got here first! nice :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants