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

Build Nix flake checks in test mode #5491

Merged
merged 3 commits into from
Jan 29, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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 b714592, which removed this previous
override of the Flake `checks`.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
thoughtpolice committed Jan 29, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
mmarchini mary marchini
commit 83c3ac469b4836b85930801d273cd5c09e5e6c33
16 changes: 15 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -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";
thoughtpolice marked this conversation as resolved.
Show resolved Hide resolved
});

devShells.default = let
packages = with pkgs; [
rustShellToolchain