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

Investigate ways to make CI faster #482

Closed
matthiasbeyer opened this issue Oct 23, 2023 · 1 comment · Fixed by #493
Closed

Investigate ways to make CI faster #482

matthiasbeyer opened this issue Oct 23, 2023 · 1 comment · Fixed by #493

Comments

@matthiasbeyer
Copy link
Member

I really don't like how slow CI is for this repository.

If someone wants to make CI faster, I'd love to see PRs for that!

@polarathene
Copy link
Collaborator

polarathene commented Oct 25, 2023

Just came across this, might be worth looking into if someone does tackle this:

Doesn't really look like the tests are using that much time, more so on the build portion prior.


You could have your matrix build jobs start with building config-rs with dev-dependencies, and uploading that artifact for all subsequent matrix jobs to download a copy of. Might be a speed-up.

If actions/cache action can be leveraged, that's usually nicer and they can avoid that initial job, one will upload the cache if it's fresh and subsequent runs of the CI will bring in that cache if nothing has changed (eg: Cargo.lock).


I haven't worked with Rust with Github Actions, but I imagine you could cache some of the time consuming parts. I see in the actions history:

  • Some jobs take 5 minutes to run cargo --check. Those seem to be for a specific MSRV version rather than stable/beta/nightly channels. Not sure why they are slower, perhaps Github has some cache proxy layer for the more common channels to save bandwidth? 🤷‍♂️
  • Other jobs like cargo clippy and cargo test can take 1-2 minutes to download and compile the crates, which is the bulk of the jobs. Leveraging cache would help there a fair bit.

A quick look, this action seems to be a popular way to cache dependencies, benefits from a Cargo.lock being present, with only caveat being less useful on Nightly toolchain. So that should hopefully make a difference with #492 👍

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

Successfully merging a pull request may close this issue.

2 participants