Hydra only build x86_64-linux
This commit is contained in:
120
flake.nix
120
flake.nix
@@ -50,7 +50,10 @@
|
|||||||
propagatedBuildInputs = with pkgs; [
|
propagatedBuildInputs = with pkgs; [
|
||||||
ffmpeg_5-headless
|
ffmpeg_5-headless
|
||||||
];
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
hydraPlatforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
# Additional environment variables can be set directly
|
# Additional environment variables can be set directly
|
||||||
# MY_CUSTOM_VAR = "some value";
|
# MY_CUSTOM_VAR = "some value";
|
||||||
};
|
};
|
||||||
@@ -65,70 +68,71 @@
|
|||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
checks = {
|
checks = {
|
||||||
# Build the crate as part of `nix flake check` for convenience
|
# Build the crate as part of `nix flake check` for convenience
|
||||||
inherit newalan;
|
inherit newalan;
|
||||||
|
|
||||||
# Run clippy (and deny all warnings) on the crate source,
|
# Run clippy (and deny all warnings) on the crate source,
|
||||||
# again, resuing the dependency artifacts from above.
|
# again, resuing the dependency artifacts from above.
|
||||||
#
|
#
|
||||||
# Note that this is done as a separate derivation so that
|
# Note that this is done as a separate derivation so that
|
||||||
# we can block the CI if there are issues here, but not
|
# we can block the CI if there are issues here, but not
|
||||||
# prevent downstream consumers from building our crate by itself.
|
# prevent downstream consumers from building our crate by itself.
|
||||||
newalan-clippy = craneLib.cargoClippy (commonArgs // {
|
newalan-clippy = craneLib.cargoClippy (commonArgs // {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
||||||
});
|
});
|
||||||
|
|
||||||
newalan-doc = craneLib.cargoDoc (commonArgs // {
|
newalan-doc = craneLib.cargoDoc (commonArgs // {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
});
|
});
|
||||||
|
|
||||||
# Check formatting
|
# Check formatting
|
||||||
newalan-fmt = craneLib.cargoFmt {
|
newalan-fmt = craneLib.cargoFmt {
|
||||||
inherit src;
|
inherit src;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Audit dependencies
|
||||||
|
newalan-audit = craneLib.cargoAudit {
|
||||||
|
inherit src advisory-db;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Run tests with cargo-nextest
|
||||||
|
# Consider setting `doCheck = false` on `newalan` if you do not want
|
||||||
|
# the tests to run twice
|
||||||
|
newalan-nextest = craneLib.cargoNextest (commonArgs // {
|
||||||
|
inherit cargoArtifacts;
|
||||||
|
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;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
# Audit dependencies
|
packages.default = newalan;
|
||||||
newalan-audit = craneLib.cargoAudit {
|
|
||||||
inherit src advisory-db;
|
apps.default = flake-utils.lib.mkApp {
|
||||||
|
drv = newalan;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Run tests with cargo-nextest
|
devShells.default = pkgs.mkShell {
|
||||||
# Consider setting `doCheck = false` on `newalan` if you do not want
|
inputsFrom = builtins.attrValues self.checks.${system};
|
||||||
# the tests to run twice
|
|
||||||
newalan-nextest = craneLib.cargoNextest (commonArgs // {
|
|
||||||
inherit cargoArtifacts;
|
|
||||||
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;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
packages.default = newalan;
|
# Additional dev-shell environment variables can be set directly
|
||||||
|
# MY_CUSTOM_DEVELOPMENT_VAR = "something else";
|
||||||
|
|
||||||
apps.default = flake-utils.lib.mkApp {
|
# Extra inputs can be added here
|
||||||
drv = newalan;
|
nativeBuildInputs = with pkgs; [
|
||||||
};
|
cargo
|
||||||
|
rustc
|
||||||
devShells.default = pkgs.mkShell {
|
rust-analyzer
|
||||||
inputsFrom = builtins.attrValues self.checks.${system};
|
];
|
||||||
|
};
|
||||||
# Additional dev-shell environment variables can be set directly
|
}
|
||||||
# MY_CUSTOM_DEVELOPMENT_VAR = "something else";
|
);
|
||||||
|
|
||||||
# Extra inputs can be added here
|
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
cargo
|
|
||||||
rustc
|
|
||||||
rust-analyzer
|
|
||||||
];
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user