Loading ci/eval/compare/default.nix +8 −2 Original line number Diff line number Diff line Loading @@ -110,9 +110,15 @@ let // lib.mapAttrs' ( kernel: rebuilds: lib.nameValuePair "10.rebuild-${kernel}-stdenv" (lib.elem "stdenv" rebuilds) ) rebuildsByKernel // { "10.rebuild-nixos-tests" = lib.elem "nixosTests.simple" (extractPackageNames diffAttrs.rebuilds) && # Only set this label when no other label with indication for staging has been set. # This avoids confusion whether to target staging or batch this with kernel updates. lib.last (lib.sort lib.lessThan (lib.attrValues rebuildCountByKernel)) <= 500; # Set the "11.by: package-maintainer" label to whether all packages directly # changed are maintained by the PR's author. // { "11.by: package-maintainer" = maintainers ? ${githubAuthorId} && lib.all (lib.flip lib.elem maintainers.${githubAuthorId}) ( Loading ci/eval/outpaths.nix +15 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,8 @@ }: let lib = import (path + "/lib"); hydraJobs = nixpkgsJobs = import (path + "/pkgs/top-level/release.nix") # Compromise: accuracy vs. resources needed for evaluation. { Loading Loading @@ -59,9 +60,15 @@ let __allowFileset = false; }; }; nixosJobs = import (path + "/nixos/release.nix") { inherit attrNamesOnly; supportedSystems = if systems == null then [ builtins.currentSystem ] else systems; }; recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; }; # hydraJobs leaves recurseForDerivations as empty attrmaps; # release-lib leaves recurseForDerivations as empty attrmaps; # that would break nix-env and we also need to recurse everywhere. tweak = lib.mapAttrs ( name: val: Loading @@ -87,4 +94,9 @@ let ]; in tweak (builtins.removeAttrs hydraJobs blacklist) tweak ( (builtins.removeAttrs nixpkgsJobs blacklist) // { nixosTests.simple = nixosJobs.tests.simple; } ) nixos/release.nix +29 −7 Original line number Diff line number Diff line Loading @@ -12,6 +12,16 @@ with import ../lib; "aarch64-linux" ], configuration ? { }, # This flag, if set to true, causes the resulting tree of attributes # to *not* have a ".${system}" suffixed upon every job name like Hydra # expects. So far, this is only implemented for `tests`. # # This flag exists mainly for use by ci/eval/attrpaths.nix; see # that file for full details. The exact behavior of this flag # may change; it should be considered an internal implementation # detail of ci/eval. attrNamesOnly ? false, }: with import ../pkgs/top-level/release-lib.nix { inherit supportedSystems; }; Loading @@ -31,7 +41,12 @@ let import ./tests/all-tests.nix { inherit system; pkgs = import ./.. { inherit system; }; callTest = config: { callTest = config: if attrNamesOnly then hydraJob config.test else { ${system} = hydraJob config.test; }; } Loading @@ -41,13 +56,20 @@ let allDrivers = import ./tests/all-tests.nix { inherit system; pkgs = import ./.. { inherit system; }; callTest = config: { callTest = config: if attrNamesOnly then hydraJob config.test else { ${system} = hydraJob config.driver; }; }; }; allTests = foldAttrs recursiveUpdate { } (map allTestsForSystem supportedSystems); allTests = foldAttrs recursiveUpdate { } ( map allTestsForSystem (if attrNamesOnly then [ (head supportedSystems) ] else supportedSystems) ); pkgs = import ./.. { system = "x86_64-linux"; }; Loading nixos/tests/simple.nix +1 −9 Original line number Diff line number Diff line { pkgs, ... }: { name = "simple"; meta = with pkgs.lib.maintainers; { maintainers = [ ]; }; nodes.machine = { ... }: { imports = [ ../modules/profiles/minimal.nix ]; }; nodes.machine = { }; testScript = '' start_all() Loading Loading
ci/eval/compare/default.nix +8 −2 Original line number Diff line number Diff line Loading @@ -110,9 +110,15 @@ let // lib.mapAttrs' ( kernel: rebuilds: lib.nameValuePair "10.rebuild-${kernel}-stdenv" (lib.elem "stdenv" rebuilds) ) rebuildsByKernel // { "10.rebuild-nixos-tests" = lib.elem "nixosTests.simple" (extractPackageNames diffAttrs.rebuilds) && # Only set this label when no other label with indication for staging has been set. # This avoids confusion whether to target staging or batch this with kernel updates. lib.last (lib.sort lib.lessThan (lib.attrValues rebuildCountByKernel)) <= 500; # Set the "11.by: package-maintainer" label to whether all packages directly # changed are maintained by the PR's author. // { "11.by: package-maintainer" = maintainers ? ${githubAuthorId} && lib.all (lib.flip lib.elem maintainers.${githubAuthorId}) ( Loading
ci/eval/outpaths.nix +15 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,8 @@ }: let lib = import (path + "/lib"); hydraJobs = nixpkgsJobs = import (path + "/pkgs/top-level/release.nix") # Compromise: accuracy vs. resources needed for evaluation. { Loading Loading @@ -59,9 +60,15 @@ let __allowFileset = false; }; }; nixosJobs = import (path + "/nixos/release.nix") { inherit attrNamesOnly; supportedSystems = if systems == null then [ builtins.currentSystem ] else systems; }; recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; }; # hydraJobs leaves recurseForDerivations as empty attrmaps; # release-lib leaves recurseForDerivations as empty attrmaps; # that would break nix-env and we also need to recurse everywhere. tweak = lib.mapAttrs ( name: val: Loading @@ -87,4 +94,9 @@ let ]; in tweak (builtins.removeAttrs hydraJobs blacklist) tweak ( (builtins.removeAttrs nixpkgsJobs blacklist) // { nixosTests.simple = nixosJobs.tests.simple; } )
nixos/release.nix +29 −7 Original line number Diff line number Diff line Loading @@ -12,6 +12,16 @@ with import ../lib; "aarch64-linux" ], configuration ? { }, # This flag, if set to true, causes the resulting tree of attributes # to *not* have a ".${system}" suffixed upon every job name like Hydra # expects. So far, this is only implemented for `tests`. # # This flag exists mainly for use by ci/eval/attrpaths.nix; see # that file for full details. The exact behavior of this flag # may change; it should be considered an internal implementation # detail of ci/eval. attrNamesOnly ? false, }: with import ../pkgs/top-level/release-lib.nix { inherit supportedSystems; }; Loading @@ -31,7 +41,12 @@ let import ./tests/all-tests.nix { inherit system; pkgs = import ./.. { inherit system; }; callTest = config: { callTest = config: if attrNamesOnly then hydraJob config.test else { ${system} = hydraJob config.test; }; } Loading @@ -41,13 +56,20 @@ let allDrivers = import ./tests/all-tests.nix { inherit system; pkgs = import ./.. { inherit system; }; callTest = config: { callTest = config: if attrNamesOnly then hydraJob config.test else { ${system} = hydraJob config.driver; }; }; }; allTests = foldAttrs recursiveUpdate { } (map allTestsForSystem supportedSystems); allTests = foldAttrs recursiveUpdate { } ( map allTestsForSystem (if attrNamesOnly then [ (head supportedSystems) ] else supportedSystems) ); pkgs = import ./.. { system = "x86_64-linux"; }; Loading
nixos/tests/simple.nix +1 −9 Original line number Diff line number Diff line { pkgs, ... }: { name = "simple"; meta = with pkgs.lib.maintainers; { maintainers = [ ]; }; nodes.machine = { ... }: { imports = [ ../modules/profiles/minimal.nix ]; }; nodes.machine = { }; testScript = '' start_all() Loading