Skip to content

Commit 6eadbf9

Browse files
committed
ci/eval: allow precisely choosing which systems to evaluate for (evalSystem -> evalSystems)
1 parent f5c4230 commit 6eadbf9

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

ci/eval/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ The code in this directory is used by the [eval.yml](../../.github/workflows/eva
55
Furthermore it also allows local evaluation using
66
```
77
nix-build ci -A eval.full \
8-
--max-jobs 4
9-
--cores 2
10-
--arg chunkSize 10000
8+
--max-jobs 4 \
9+
--cores 2 \
10+
--arg chunkSize 10000 \
11+
--arg evalSystems '["x86_64-linux" "aarch64-darwin"]'
1112
```
1213

1314
- `--max-jobs`: The maximum number of derivations to run at the same time. Only each [supported system](../supportedSystems.nix) gets a separate derivation, so it doesn't make sense to set this higher than that number.
1415
- `--cores`: The number of cores to use for each job. Recommended to set this to the amount of cores on your system divided by `--max-jobs`.
1516
- `chunkSize`: The number of attributes that are evaluated simultaneously on a single core. Lowering this decreases memory usage at the cost of increased evaluation time. If this is too high, there won't be enough chunks to process them in parallel, and will also increase evaluation time.
17+
- `evalSystems`: The set of systems for which `nixpkgs` should be evaluated. Defaults to the four official platforms (`x86_64-linux`, `aarch64-linux`, `x86_64-darwin` and `aarch64-darwin`).
1618

1719
A good default is to set `chunkSize` to 10000, which leads to about 3.6GB max memory usage per core, so suitable for fully utilising machines with 4 cores and 16GB memory, 8 cores and 32GB memory or 16 cores and 64GB memory.
1820

ci/eval/default.nix

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,22 +259,21 @@ let
259259

260260
full =
261261
{
262-
# Whether to evaluate just a single system, by default all are evaluated
263-
evalSystem ? if quickTest then "x86_64-linux" else null,
262+
# Whether to evaluate on a specific set of systems, by default all are evaluated
263+
evalSystems ? if quickTest then [ "x86_64-linux" ] else supportedSystems,
264264
# The number of attributes per chunk, see ./README.md for more info.
265265
chunkSize,
266266
quickTest ? false,
267267
}:
268268
let
269-
systems = if evalSystem == null then supportedSystems else [ evalSystem ];
270269
results = linkFarm "results" (
271270
map (evalSystem: {
272271
name = evalSystem;
273272
path = singleSystem {
274273
inherit quickTest evalSystem chunkSize;
275274
attrpathFile = attrpathsSuperset + "/paths.json";
276275
};
277-
}) systems
276+
}) evalSystems
278277
);
279278
in
280279
combine {

0 commit comments

Comments
 (0)