mehcode / config-rs

⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
Apache License 2.0
2.43k stars 206 forks source link

Investigate ways to make CI faster #482

Closed matthiasbeyer closed 5 months ago

matthiasbeyer commented 8 months ago

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 commented 8 months ago

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:

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 https://github.com/mehcode/config-rs/pull/492 👍