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

Optimize CI times #53

Closed
wants to merge 8 commits into from
Closed

Optimize CI times #53

wants to merge 8 commits into from

Conversation

ErichDonGubler
Copy link
Owner

@ErichDonGubler ErichDonGubler commented Apr 4, 2023

File, job name, optionally step Total runtime of job (pre-caching) Total runtime of step (pre-caching) Time spent compiling stuff with Cargo (pre-caching) Time spent compiling stuff with Cargo (post-caching) Cache size
ci.yml:check-msrv 2m 16s - 1m 43s 1m 0s 139 MB
ci.yml:test:Default test 4m 12s 2m 07s 2m 07s 17s 303 MB
ci.yml:test:Test all features 4m 12s 1m 53s 1m 39s 46s 303 MB
ci.yml:check:Check benchmarks 2m 49s 2m 09s 2m 08s 19s 146 MB
ci.yml:check:Check naga-fuzz 2m 49s 36s 35s 30s 146 MB
ci.yml:documentation 1m 59s - 1m 55s 25s 127 MB
validate-linux.yml:validate-linux 2m 29s - 2m 06s

Re-implement `naga` development workflows using [`cargo xtask`]. Convert
`make` logic and shader test configuration as file with Bash variables
into an `xtask` crate and YAML files, respectively.

Pros:

* We now have a _portable_ workflow everywhere, which means Windows
  folks and people who don't install `make` don't have to suffer.
  😮‍💨
* Workflow logic is now relatively easy to inspect and change. Whew!
  💁🏻‍♂️💦
* Contributors can use their existing Rust knowledge to contribute to
  developer experience. 🎉
* `cargo xtask` is a relatively well-known convention for workflows in
  the ecosystem.
* We can do fancy things like allow folks to run at different log levels
  for workflows, depending on their tastes.

Cons:

* There's now a non-trivial compile step to project workflow.
  Incremental rebuilds seem to be pretty short, though!
* Code is much more verbose than the (very) terse `make` implementation.

[`cargo xtask`]: https://github.com/matklad/cargo-xtask
TODO: Explain why this is a good idea:
* We will definitely need this for speeding up CI, which is the real
  impetus here.
* This basically shouldn't affect anybody that is using a library
  version of Naga; only binaries consumers, who still have a choice
  whether they will honor a `Cargo.lock`.
@ErichDonGubler
Copy link
Owner Author

Closing in favor of gfx-rs#2376.

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.

1 participant