From 7b7f36de55cc4e9c39201023c4f894fa14c84d05 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Thu, 24 Oct 2024 14:11:16 +0200 Subject: [PATCH] only show checks for x86_64-linux --- .github/workflows/build.yaml | 2 -- flake.nix | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 22476b7..c75f0ca 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,5 @@ jobs: with: nix_conf: | allow-import-from-derivation = true - filter_builds: | - '.top_attr == "checks" and .system == "x86_64-linux"' secrets: nixbuild_token: ${{ secrets.nixbuild_token }} diff --git a/flake.nix b/flake.nix index 4a83e42..b447e76 100644 --- a/flake.nix +++ b/flake.nix @@ -78,12 +78,14 @@ checks = let + inherit (pkgs.lib) foldl foldlAttrs mergeAttrs optionalAttrs; + importFiles = files: map (m: pkgs.callPackage m {}) files; - mergeTests = pkgs.lib.lists.foldl pkgs.lib.trivial.mergeAttrs {}; + mergeTests = foldl mergeAttrs {}; - flattenAttrs = root: attrset: pkgs.lib.attrsets.foldlAttrs (acc: name: value: acc // { + flattenAttrs = root: attrset: foldlAttrs (acc: name: value: acc // { "${root}_${name}" = value; }) {} attrset; @@ -95,7 +97,7 @@ ); shblib = pkgs.callPackage ./lib {}; - in (rec { + in (optionalAttrs (system == "x86_64-linux") ({ modules = shblib.check { inherit pkgs; tests = @@ -132,7 +134,7 @@ // (vm_test "postgresql" ./test/blocks/postgresql.nix) // (vm_test "restic" ./test/blocks/restic.nix) // (vm_test "ssl" ./test/blocks/ssl.nix) - ); + )); } ) // { herculesCI.ciSystems = [ "x86_64-linux" ];