Needs to be in hydraJobs

This commit is contained in:
2023-03-09 00:39:21 -05:00
parent 030820543c
commit f646dbac1d

View File

@@ -67,8 +67,7 @@
newalan = craneLib.buildPackage (commonArgs // {
inherit cargoArtifacts;
});
in
{
in rec {
checks = pkgs.lib.optionalAttrs (system == "x86_64-linux") {
# Build the crate as part of `nix flake check` for convenience
inherit newalan;
@@ -106,6 +105,15 @@
partitions = 1;
partitionType = "count";
});
} // lib.optionalAttrs (system == "x86_64-linux") {
# NB: cargo-tarpaulin only supports x86_64 systems
# Check code coverage (note: this will not upload coverage anywhere)
newalan-coverage = craneLib.cargoTarpaulin (commonArgs // {
inherit cargoArtifacts;
});
};
hydraJobs = checks // {
runCommandHook = {
newalan = pkgs.writeScript "run-me" ''
#!${pkgs.runtimeShell}
@@ -113,12 +121,6 @@
${pkgs.jq}/bin/jq . "$HYDRA_JSON"
'';
};
} // lib.optionalAttrs (system == "x86_64-linux") {
# NB: cargo-tarpaulin only supports x86_64 systems
# Check code coverage (note: this will not upload coverage anywhere)
newalan-coverage = craneLib.cargoTarpaulin (commonArgs // {
inherit cargoArtifacts;
});
};
packages.default = newalan;