-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
build: test parallelization ⚡️ #3319
Merged
Merged
Conversation
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
erickzhao
force-pushed
the
test-refactor-circleci
branch
3 times, most recently
from
August 25, 2023 01:15
d3bd02b
to
676a34f
Compare
erickzhao
force-pushed
the
test-refactor-circleci
branch
from
August 25, 2023 01:25
676a34f
to
34b4142
Compare
erickzhao
force-pushed
the
test-refactor-circleci
branch
from
August 28, 2023 21:51
ec8fc01
to
573d41a
Compare
erickzhao
force-pushed
the
test-refactor-circleci
branch
from
August 28, 2023 22:13
573d41a
to
362c0ac
Compare
erickzhao
force-pushed
the
test-refactor-circleci
branch
from
August 28, 2023 23:17
74fbdc9
to
f209f96
Compare
erikian
reviewed
Aug 29, 2023
erikian
reviewed
Aug 29, 2023
VerteDinde
approved these changes
Aug 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing - thanks so much for adding this! 👏
erikian
approved these changes
Aug 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
dsanders11
approved these changes
Aug 29, 2023
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.
Summary
This PR streamlines our CircleCI configuration in two ways.
Build once, test everywhere
In
main
, our CircleCI job matrix runs two test jobs for each target platform and architecture. In practice, this means 8 test jobs:Each one of these jobs currently the entire linting and building process for Forge separately. These are both wasteful:
Thus, this PR adds a separate
lint-and-build
job that runs on Linux because the runner on that platform is fast and cheap.This will reduce total CI time from$t_{total} = t_{b1} + t_{t1} + ... + t_{b8} + t_{t_8}$ to $t_{total}' = t_{b} + t_{t1} + ... + t_{t8}$ , where $t_{bn} + t_{tn}$ is the build and test time respectively for job ${n}$ .
However, in more practical terms, this will only reduce time-to-green by$\Delta = t_{slowest\ build} - t_{fastest\ build}$ .
CircleCI test splitting
CircleCI has a test splitting feature that relies on submitting JUnit format test reports to Circle. #3316 added that reporting, and this PR follows it up by adding the test splitting feature to our Slow test suites.
In an ideal world where tests can be split evenly$n$ ways, this theoretically reduces the runtime of slow test jobs from $t_{slow}$ to $t_{slow}'$ , where $n$ is the parallelization factor for the runners.
In order to do so, a few things needed to be changed:
test-globber.ts
was removed for some tweaks in.mocharc.js
.yarn test:fast
andyarn test:slow
should still work as before, though.Outcomes
In practice, the first green run in this PR reduced the time-to-green time from 32:42 -> 25:58 (-20.6%). There are a few future improvements to explore:
wixtoolset
via Chocolatey.