nix: build flake checks in test profile

Overall, building in the test profile should significantly speed up
the overall build pipeline because so many less cycles are spent (on
GHA runners that are certainly at high load). The goal here is to help
reduce CI flake outs due to things timing out; I suspect part of the
problem may be a lot of the ~15 minute time limit being used up just
compiling things.

This is a partial revert of b714592952, which removed this previous
override of the Flake `checks`.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2025-01-27 14:14:33 -06:00
parent 1473c0cd4f
commit 6f1d15bd1a

View file

@ -100,7 +100,6 @@
};
in {
formatter = pkgs.alejandra;
checks.jujutsu = self.packages.${system}.jujutsu;
packages = {
jujutsu = rustMinimalPlatform.buildRustPackage {
@ -150,6 +149,21 @@
default = self.packages.${system}.jujutsu;
};
checks.jujutsu = self.packages.${system}.jujutsu.overrideAttrs ({...}: {
# The default Rust infrastructure runs all builds in the release
# profile, which is significantly slower. Run this under the `test`
# profile instead, which matches all our other CI systems, Cargo, etc.
cargoBuildType = "test";
cargoCheckType = "test";
# By default, `flake check` will want to run the install phase, but
# because we override the cargoBuildType, it fails to find the proper
# binary. But we don't even care about the binary or even the buildPhase
# in this case; just remove them both.
buildPhase = "true";
installPhase = "touch $out";
});
devShells.default = let
packages = with pkgs; [
rustShellToolchain