-
Notifications
You must be signed in to change notification settings - Fork 46
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
chore: reduce ci usage #480
Conversation
99969cb
to
058df48
Compare
This should help reduce the CI usage by: 1. Only running CI on either: - PRs targetting `master` - pushes to `master` Most importantly, CI is no longer doubled in PRs (as previously, `push` and `pull_request` would _both_ be triggered). 2. Cancelling existing runs if a new commit is added Signed-off-by: JP-Ellis <[email protected]>
058df48
to
9925028
Compare
The building of dependencies takes a lot of time, providing no benefit to splitting the CI in each version. Instead, combine them all and use nextest to speed up tests. Signed-off-by: JP-Ellis <[email protected]>
Nextest is typically faster to run Signed-off-by: JP-Ellis <[email protected]>
Signed-off-by: JP-Ellis <[email protected]>
1519b88
to
2a5510b
Compare
Signed-off-by: JP-Ellis <[email protected]>
Signed-off-by: JP-Ellis <[email protected]>
4c2114d
to
535f174
Compare
Signed-off-by: JP-Ellis <[email protected]>
535f174
to
f80cf9f
Compare
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
cancel-in-progress: true |
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.
I'll remove that, that would be annoying. Imagine waiting for a build, then someone else pushes a commit.
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.
The concurrency group is per-PR, or per branch in the case of a push
trigger (which would only happen in master).
So two PRs can have CI running concurrently with no issue; and if two PRs merge in quick succession, the second merge will cancel the first. But once merged, there shouldn't be any waiting
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.
So there should not be a case of waiting for a build, and it being canceled by someone else's push except if you are both working on the same PR.
If you want this to run specifically when creating tagged released, I recommend creating a separate trigger for tags.
This should help reduce the CI usage by:
Only running CI on either:
master
master
Most importantly, CI is no longer doubled in PRs (as previously,
push
andpull_request
would both be triggered, consuming double the number of runners).Cancelling existing runs if a new commit is added
Speeding up some existing builds by not unnecessarily rebuilding everything (especially with the compatibility suite)
Using nextest in place of
cargo test
as it is typically fasterUsing caching of build dependencies where possible