This repository has been archived by the owner on Apr 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
release.nix
65 lines (51 loc) · 1.81 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
############################################################################
#
# Hydra release jobset.
#
# The purpose of this file is to select jobs defined in default.nix and map
# them to all supported build platforms.
#
############################################################################
# The project sources
{ iohk-skeleton ? { outPath = ./.; rev = "abcdef"; }
# Function arguments to pass to the project
, projectArgs ? {
config = { allowUnfree = false; inHydra = true; };
inherit sourcesOverride;
}
# The systems that the jobset will be built for.
, supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
# The systems used for cross-compiling
, supportedCrossSystems ? [ "x86_64-linux" ]
# A Hydra option
, scrubJobs ? true
# Dependencies overrides
, sourcesOverride ? {}
# Import pkgs, including IOHK common nix lib
, pkgs ? import ./nix { inherit sourcesOverride; }
}:
with (import pkgs.commonLib.release-lib) {
inherit pkgs;
inherit supportedSystems supportedCrossSystems scrubJobs projectArgs;
packageSet = import iohk-skeleton;
gitrev = iohk-skeleton.rev;
};
with pkgs.lib;
let
testsSupportedSystems = [ "x86_64-linux" ];
collectTests = ds: filter (d: elem d.system testsSupportedSystems) (collect isDerivation ds);
inherit (systems.examples) mingwW64 musl64;
jobs = {
native = mapTestOn (packagePlatforms project);
"${mingwW64.config}" = mapTestOnCross mingwW64 (packagePlatformsCross project);
} // (mkRequiredJob (
collectTests jobs.native.checks.tests ++
collectTests jobs.native.benchmarks ++
# TODO: Add your project executables to this list
[ jobs.native.iohk-skeleton.x86_64-linux
]
))
# Build the shell derivation in Hydra so that all its dependencies
# are cached.
// mapTestOn (packagePlatforms { inherit (project) shell; });
in jobs