From 66ddeea719beff307c217c0f9177e01c5b281b9d Mon Sep 17 00:00:00 2001 From: marshmallow Date: Wed, 3 Sep 2025 10:26:25 +1000 Subject: [PATCH] use buildbot-nix.toml and `hydraJobs` --- buildbot-nix.toml | 3 +++ flake.nix | 15 +++++++++++++++ nix/checks.nix | 25 ++++++++++--------------- 3 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 buildbot-nix.toml diff --git a/buildbot-nix.toml b/buildbot-nix.toml new file mode 100644 index 0000000..218eadb --- /dev/null +++ b/buildbot-nix.toml @@ -0,0 +1,3 @@ +attribute = "hydraJobs" +flake_dir = "." +lock_file = "flake.lock" diff --git a/flake.nix b/flake.nix index 66f5a32..fce76e4 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,7 @@ outputs = { self, + nixpkgs, flake-parts, systems, git-hooks, @@ -44,6 +45,20 @@ flake = { nixosModules.default = import ./runtime/module.nix; makeHive = import ./runtime/makeHive.nix; + hydraJobs = + let + inherit (inputs.nixpkgs) lib; + in + { + packages = { + inherit (self.packages.x86_64-linux) docs; + } + // lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: { + inherit (self.packages.${system}) wire wire-small; + }); + + tests = lib.filterAttrs (n: _: (lib.hasPrefix "vm" n)) self.checks.x86_64-linux; + }; }; perSystem = diff --git a/nix/checks.nix b/nix/checks.nix index 0940c3c..406845f 100644 --- a/nix/checks.nix +++ b/nix/checks.nix @@ -3,24 +3,19 @@ { craneLib, commonArgs, - self', ... }: { - checks = { - inherit (self'.packages) wire wire-small docs; + checks.wire-nextest = craneLib.cargoNextest ( + { + partitions = 2; + cargoArtifacts = craneLib.buildDepsOnly commonArgs; + cargoNextestPartitionsExtraArgs = builtins.concatStringsSep " " [ + "--no-tests pass" + ]; - wire-nextest = craneLib.cargoNextest ( - { - partitions = 2; - cargoArtifacts = craneLib.buildDepsOnly commonArgs; - cargoNextestPartitionsExtraArgs = builtins.concatStringsSep " " [ - "--no-tests pass" - ]; - - } - // commonArgs - ); - }; + } + // commonArgs + ); }; } -- 2.51.2