don’t nest jobsets
This commit is contained in:
parent
511964d74f
commit
1d1046fbda
1 changed files with 31 additions and 38 deletions
|
@ -7,39 +7,42 @@
|
||||||
systems = ["x86_64-linux" "aarch64-linux" "riscv64-linux"];
|
systems = ["x86_64-linux" "aarch64-linux" "riscv64-linux"];
|
||||||
nixpkgs_version = ["master" "nixos-22.05"];
|
nixpkgs_version = ["master" "nixos-22.05"];
|
||||||
mkJobsets = system: version:
|
mkJobsets = system: version:
|
||||||
(pkgs.lib.mapAttrs (
|
(pkgs.lib.mapAttrs' (
|
||||||
num: info: {
|
num: info: {
|
||||||
enabled = 1;
|
name = "${system}-${version}-pr${num}";
|
||||||
hidden = false;
|
value = {
|
||||||
description = "PR ${num} (${system}-${version}): ${info.title}";
|
enabled = 1;
|
||||||
nixexprinput = "nix-packages";
|
hidden = false;
|
||||||
nixexprpath = "hydra/default.nix";
|
description = "PR ${num} (${system}-${version}): ${info.title}";
|
||||||
checkinterval = 60;
|
nixexprinput = "nix-packages";
|
||||||
schedulingshares = 100;
|
nixexprpath = "hydra/default.nix";
|
||||||
enableemail = false;
|
checkinterval = 60;
|
||||||
emailoverride = "";
|
schedulingshares = 100;
|
||||||
keepnr = 1;
|
enableemail = false;
|
||||||
inputs = {
|
emailoverride = "";
|
||||||
nix-packages = {
|
keepnr = 1;
|
||||||
type = "git";
|
inputs = {
|
||||||
value = "https://github.com/${info.head.repo.owner.login}/${info.head.repo.name}.git ${info.head.ref}";
|
nix-packages = {
|
||||||
emailresponsible = false;
|
type = "git";
|
||||||
};
|
value = "https://github.com/${info.head.repo.owner.login}/${info.head.repo.name}.git ${info.head.ref}";
|
||||||
nixpkgs = {
|
emailresponsible = false;
|
||||||
type = "git";
|
};
|
||||||
value = "https://github.com/NixOS/nixpkgs.git ${version}";
|
nixpkgs = {
|
||||||
emailresponsible = false;
|
type = "git";
|
||||||
};
|
value = "https://github.com/NixOS/nixpkgs.git ${version}";
|
||||||
system = {
|
emailresponsible = false;
|
||||||
type = "string";
|
};
|
||||||
value = system;
|
system = {
|
||||||
|
type = "string";
|
||||||
|
value = system;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
prs)
|
prs)
|
||||||
// {
|
// {
|
||||||
main = {
|
"${system}-${version}" = {
|
||||||
enabled = 1;
|
enabled = 1;
|
||||||
hidden = false;
|
hidden = false;
|
||||||
description = "nix-packages ${system}-${version}";
|
description = "nix-packages ${system}-${version}";
|
||||||
|
@ -69,17 +72,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mapToAttrs = f: list: pkgs.lib.listToAttrs (map f list);
|
concatAttrs = pkgs.lib.foldr (a: b: a // b) {};
|
||||||
|
|
||||||
jobsets =
|
jobsets = concatAttrs (pkgs.lib.concatMap (system: map (version: mkJobsets system version) nixpkgs_version) systems);
|
||||||
mapToAttrs (system: {
|
|
||||||
name = system;
|
|
||||||
value =
|
|
||||||
mapToAttrs (version: {
|
|
||||||
name = version;
|
|
||||||
value = mkJobsets system version;
|
|
||||||
})
|
|
||||||
nixpkgs_version;
|
|
||||||
})
|
|
||||||
systems;
|
|
||||||
in {jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets);}
|
in {jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets);}
|
||||||
|
|
Reference in a new issue