-
Notifications
You must be signed in to change notification settings - Fork 17
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
split CI tests #24
split CI tests #24
Conversation
ad79f3a
to
ffa9625
Compare
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.
neat trick to split tests. Unfortunate how many distinct tests there are with the 4 combinations of 5 tests, though
args: --ignore RUSTSEC-2020-0071 | ||
|
||
- name: Run Audit Tool | ||
run: cargo audit --ignore RUSTSEC-2020-0071 |
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.
note to self or for someone else to remember, if we remove the SDK dependency in #23, we can remove this ignore
Turns out, GitHub has a hard limit on how many jobs run in parallel at any point in time. It's 20 in total and a maximum of 5 of them for macOS. And from the tests, it seems to prioritize running Ubuntu over macOS. Perhaps I should switch the matrix order. |
Or maybe just split into fewer groups? There are 6 non-batch options, so if it was split into 4 groups, it would be one over that 20 total? no opinions here |
Looking at https://github.com/orgs/community/discussions/26343#discussioncomment-3251562, turns out that limit is organization-wide. So all repositories under the This affects us quite a bit, as the current PR state requires 6 of those runners. And looking at the last CI run – https://github.com/near/cargo-near/actions/runs/2877970694/usage The macOS jobs seem to have waited on each other. Increasing our CI runtime even more than originally. For this reason, I'm just going to close this PR. I wonder if it's worth it to explore using the same node to test with the Quick question though? why are we testing |
That is indeed MSRV, but I wonder if MSRV even makes sense for a binary... Another thing to consider: maybe we should only run integration tests as a cron job (e.g. once per day) and ping us all if it fails? |
Not really. But even if it did, we wouldn't need to run tests for MSRV. A simple
Yeah, we can do that. Although, would there ever be a case where the tests would yield different results between runs? Since all the variables that go into the tests are constant. I guess the only case would be dependency version changes. |
Ok, let's just get rid of 1.56.0 then. Probably not worth even doing cargo check.
I guess this would only be useful if this repo had >1 PRs merged per day, so yeah probably does not make sense for now. Only running integration tests on master (i.e. after you merge a PR) would be a good middle ground though I think. |
It only matters such that if you run cargo install, you need to have that toolchain installed. |
For that, we can use the |
Well, that indicates which version is required. The reason I'm saying MSRV is useful in CI is that you don't introduce changes that unnecessarily increase MSRV, requiring devs to upgrade/install newer toolchain to install. Nbd though |
You're right. We can reintroduce it, but leave it at |
Current CI runs use upwards of an hour to complete. — https://github.com/near/cargo-near/actions/runs/2872416612
This is an attempt at cutting that time by using multiple nodes to run the tests in parallel.