nix-community / nixdoc

Tool to generate documentation for Nix library functions [maintainer=@infinisil]
GNU General Public License v3.0
122 stars 14 forks source link

ci: Avoid duplicate build #65

Closed infinisil closed 1 year ago

infinisil commented 1 year ago

CI currently builds the nixdoc package twice, once the original derivation, and once with an override adding extra checks.

We can avoid one build by not building the original derivation without the overrides.

asymmetric commented 1 year ago

What do you think of this?

infinisil commented 1 year ago

Ahh sorry I missed that comment. Good point, indeed overriding checkPhase actually prevents cargo test from running. We can still get the same effect by overriding postCheck instead though. I verified that cargo test still runs with this.

asymmetric commented 1 year ago

I am not a huge fan of this approach, since it requires knowing too much about how buildRustPackage internals (which phases it sets), but I'll merge this for now, with the goal to switch to crane in the future, and address the CI build times without having to merge the two attributes.