|
10 | 10 | lib = genericPkgs.lib; |
11 | 11 | ci = import ./ci.nix { inherit supportedSystems ifdLevel checkMaterialization; restrictEval = true; }; |
12 | 12 | allJobs = stripAttrsForHydra (filterDerivations ci); |
13 | | -in allJobs // { |
14 | | - # On IOHK Hydra, "required" is a special job that updates the |
15 | | - # GitHub CI status. |
| 13 | + latestJobs = { |
| 14 | + # All the jobs are included in the `requiredJobs`, but the ones |
| 15 | + # added here will also included without aggregation, making it easier |
| 16 | + # to find a failing test. Keep in mind though that adding too many |
| 17 | + # of these will slow down eval times. |
| 18 | + linux = allJobs.R2009.ghc8102.linux.native or {}; |
| 19 | + darwin = allJobs.R2009.ghc8102.darwin.native or {}; |
| 20 | + }; |
| 21 | + names = x: lib.filter (n: n != "recurseForDerivations" && n != "meta") |
| 22 | + (builtins.attrNames x); |
| 23 | + requiredJobs = |
| 24 | + builtins.listToAttrs ( |
| 25 | + lib.concatMap (nixpkgsVer: |
| 26 | + let nixpkgsJobs = allJobs.${nixpkgsVer}; |
| 27 | + in lib.concatMap (compiler-nix-name: |
| 28 | + let ghcJobs = nixpkgsJobs.${compiler-nix-name}; |
| 29 | + in builtins.map (platform: { |
| 30 | + name = "required-${nixpkgsVer}-${compiler-nix-name}-${platform}"; |
| 31 | + value = genericPkgs.releaseTools.aggregate { |
| 32 | + name = "haskell.nix-${nixpkgsVer}-${compiler-nix-name}-${platform}"; |
| 33 | + meta.description = "All ${nixpkgsVer} ${compiler-nix-name} ${platform} jobs"; |
| 34 | + constituents = lib.collect (d: lib.isDerivation d) ghcJobs.${platform}; |
| 35 | + }; |
| 36 | + }) (names ghcJobs) |
| 37 | + ) (names nixpkgsJobs) |
| 38 | + ) (names allJobs)); |
| 39 | +in latestJobs // requiredJobs // { |
16 | 40 | required = genericPkgs.releaseTools.aggregate { |
17 | 41 | name = "haskell.nix-required"; |
18 | 42 | meta.description = "All jobs required to pass CI"; |
19 | | - # Hercules will require all of these, we just require the 20.09 jobs |
20 | | - # to avoid stressing Hydra too much |
21 | | - constituents = lib.collect lib.isDerivation allJobs.R2009.ghc865.linux.native; |
| 43 | + # Using the names here requires https://github.com/NixOS/hydra/issues/715 |
| 44 | + constituents = builtins.attrNames requiredJobs; |
22 | 45 | }; |
23 | | - } |
| 46 | + } |
24 | 47 |
|
25 | 48 |
|
0 commit comments