on rvl/check-hydra help sign in
haskell.nix/release.nix
35 lines 1.1 kB history raw
1{ supportedSystems ? [ "x86_64-linux" ] # spare our "x86_64-darwin" builders for now
2, scrubJobs ? true
3, haskell-nix ? { outPath = ./.; rev = "abcdef"; }
4, nixpkgsArgs ? {}
5}:
7let fixedNixpkgs = import ./nixpkgs {}; in
8with fixedNixpkgs.lib;
9with (import (fixedNixpkgs.path + "/pkgs/top-level/release-lib.nix") {
10 inherit supportedSystems scrubJobs nixpkgsArgs;
11 packageSet = import (haskell-nix + /build.nix);
12});
14let
15 # Remove tests which have meta.disabled = true
16 filterTests = let
17 nonEmpty = attrs: length (attrValues attrs) != 0;
18 removeDisabled = filterAttrs (system: test: !(test.meta.disabled or false));
19 in jobs: jobs // {
20 tests = filterAttrs (_: nonEmpty) (mapAttrs (name: removeDisabled) jobs.tests);
21 };
23 jobs = {
24 native = filterTests (mapTestOn (packagePlatforms pkgs));
25 } // {
26 # On IOHK Hydra, "required" is a special job that updates the
27 # GitHub CI status.
28 required = fixedNixpkgs.releaseTools.aggregate {
29 name = "haskell.nix-required";
30 meta.description = "All jobs required to pass CI";
31 constituents = collect isDerivation jobs.native;
32 };
33 };
35in jobs