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: Improve msrv checking and speedup CI #74

Merged
merged 17 commits into from
Mar 11, 2024

Conversation

NobodyXu
Copy link
Contributor

@NobodyXu NobodyXu commented Mar 2, 2024

Improve msrv CI:

  • Include a lockfile Cargo.lock created using cargo +nightly -Zminimal-versions update and used in msrv job to make sure it tests against the minimal version of dependencies.
  • Run cargo-check to check for msrv (in a new job), running cargo-test would also pull in test dependencies and test code

This PR also speeds up the CI from 5m down to 1m (when make and dependencies are cached).

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
macos-14 uses M1, it's much faster than macos-latest

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
So that it knows which specific version is used to invalidate caching.

Also, on 1.63 fetching from registry is especially slow, running
`cargo +stable update` befoe this can speed it up a little bit.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
It uses `-Zminimal` to use minimal versions.

It also avoids compilation to speedup CI as much as possible.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
.github/workflows/main.yml Outdated Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
.github/workflows/main.yml Outdated Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu NobodyXu requested a review from epage March 8, 2024 13:02
Copy link

@epage epage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For CI. I don't deal enough with this to speak to the test changes

Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. Glad to see the huge improvement on CI time!

I'd love to have a clearer git history. It doesn't mean we need to squash commits. Just let it make more sense and remove some intermediate commits during the development.

tests/client.rs Outdated Show resolved Hide resolved
Cargo.lock Outdated Show resolved Hide resolved
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu NobodyXu requested a review from weihanglo March 11, 2024 12:18
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given both CI and test are reviewed, I am going to merge this. Thank you!

@weihanglo weihanglo merged commit 0d10b47 into rust-lang:main Mar 11, 2024
14 checks passed
@NobodyXu NobodyXu deleted the speedup-ci branch March 11, 2024 12:45
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.

4 participants