forked from input-output-hk/haskell.nix
-
Notifications
You must be signed in to change notification settings - Fork 1
/
release.nix
38 lines (33 loc) · 1.23 KB
/
release.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ supportedSystems ? [ "x86_64-linux" ] # spare our "x86_64-darwin" builders for now
, scrubJobs ? true
, haskell-nix ? { outPath = ./.; rev = "abcdef"; }
, nixpkgsArgs ? {}
}:
let fixedNixpkgs = import ./nixpkgs {}; in
with fixedNixpkgs.lib;
with (import (fixedNixpkgs.path + "/pkgs/top-level/release-lib.nix") {
inherit supportedSystems scrubJobs nixpkgsArgs;
packageSet = import (haskell-nix + /build.nix);
});
let
# Remove tests which have meta.disabled = true
filterTests = let
nonEmpty = attrs: length (attrValues attrs) != 0;
removeDisabled = filterAttrs (system: test: !(test.meta.disabled or false));
in jobs: jobs // {
tests = filterAttrs (_: nonEmpty) (mapAttrs (name: removeDisabled) jobs.tests);
};
inherit (systems.examples) musl64;
jobs = {
native = filterTests (mapTestOn (packagePlatforms pkgs));
"${musl64.config}" = filterTests (mapTestOnCross musl64 (packagePlatforms pkgs));
} // {
# On IOHK Hydra, "required" is a special job that updates the
# GitHub CI status.
required = fixedNixpkgs.releaseTools.aggregate {
name = "haskell.nix-required";
meta.description = "All jobs required to pass CI";
constituents = collect isDerivation jobs.native;
};
};
in jobs