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: Investigate crane #104

Closed
justinrubek opened this issue Sep 16, 2022 · 1 comment
Closed

ci: Investigate crane #104

justinrubek opened this issue Sep 16, 2022 · 1 comment

Comments

@justinrubek
Copy link
Contributor

CI actions are commonly taking 15+ minutes.
image

The time spent is mostly compiling crates, with each crate being compiled fresh for each run.

Crane uses nix to cache cargo dependencies from the project separately from the crates being developed on and avoids rebuilding unchanged dependencies between invocations.

Using crane could significantly reduce CI times (assuming we also add a cache for this).

Crane also has facilities for checks using clippy, rustfmt, and cargo-tarpaulin.

A solution would replace packages built with rustPlatform.buildRustPackage with craneLib.buildPackage and craneLib.buildDepsOnly.
Additionally, craneLib.cargoClippy and craneLib.cargoFmt are desirable (see #40).

If the packages can be built using a shared cargoArtifacts then it should be trivial to persist the artifacts in cachix.

@justinrubek justinrubek added this to the Project maintenance milestone Sep 16, 2022
@justinrubek justinrubek self-assigned this Sep 22, 2022
@justinrubek
Copy link
Contributor Author

Done and merged in PR #126 and #121

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

No branches or pull requests

1 participant