forked from IntersectMBO/plutus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.nix
45 lines (40 loc) · 1.93 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
39
40
41
42
43
44
45
{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
# Passed in by Hydra depending on the configuration, contains the revision and the out path
, plutus ? null
}:
let
# The revision passed in by Hydra, if there is one
rev = if builtins.isNull plutus then null else plutus.rev;
# Generic nixpkgs for library usage
genericPkgs = import (import ./nix/sources.nix).nixpkgs {};
lib = genericPkgs.lib;
inherit (import ./nix/ci-lib.nix) stripAttrsForHydra filterDerivations;
ci = import ./ci.nix { inherit supportedSystems rev; };
# ci.nix is a set of attributes that work fine as jobs (albeit in a slightly different structure, the platform comes
# first), but we mainly just need to get rid of some extra attributes.
ciJobsets = stripAttrsForHydra (filterDerivations ci);
# Recursively collect all jobs (derivations) in a jobset
# This uses 'attrByPath' so we can give a default if the attr is missing, which can happen
# if you've set 'supportedSystems' to not include all the systems.
allJobs = path: jobset: lib.collect lib.isDerivation (lib.attrByPath path {} jobset);
in lib.fix (jobsets: ciJobsets // {
required = lib.hydraJob (genericPkgs.releaseTools.aggregate {
name = "plutus-required-checks";
constituents =
# Misc tests
(allJobs ["linux" "tests"] jobsets)
++ (allJobs ["darwin" "tests"] jobsets)
# Haskell tests
++ (allJobs ["linux" "haskell" ] jobsets)
++ (allJobs ["darwin" "haskell" ] jobsets)
# Various things that mostly just need to build on linux
++ (allJobs ["linux" "docs"] jobsets)
++ (allJobs ["linux" "papers"] jobsets)
++ (allJobs ["linux" "plutus-playground"] jobsets)
++ (allJobs ["linux" "marlowe-playground"] jobsets)
++ (allJobs ["linux" "plutus-scb"] jobsets)
# Developer scripts so they're definitely cached
++ (allJobs ["linux" "dev" "scripts"] jobsets)
++ (allJobs ["darwin" "dev" "scripts"] jobsets);
});
})