|
370 | 370 | value = flake.devShells.${n};
|
371 | 371 | }) (__attrNames flake.devShells));
|
372 | 372 | } // lib.optionalAttrs (flake ? hydraJobs) {
|
373 |
| - hydraJobs = prefixAttrs (prefix + sep) flake.hydraJobs; |
| 373 | + hydraJobs.${lib.removeSuffix ":" prefix} = flake.hydraJobs; |
374 | 374 | };
|
375 | 375 |
|
376 | 376 | # Used by `combineFlakes` to combine flakes together
|
@@ -414,6 +414,27 @@ in {
|
414 | 414 | { name = "${packageName}:test:${n}"; value = v; })
|
415 | 415 | (lib.filterAttrs (_: v: lib.isDerivation v) (package.checks))
|
416 | 416 | ) (packageNames project));
|
| 417 | + ciJobs = { |
| 418 | + # Run all the tests |
| 419 | + inherit checks; |
| 420 | + # Build tools and cache tools needed for the project |
| 421 | + inherit (project) roots; |
| 422 | + # Also build and cache any tools in the `devShell` |
| 423 | + devShell = project.shell; |
| 424 | + # Run HPC on the tests |
| 425 | + coverage = builtins.listToAttrs (lib.concatMap (packageName: [{ |
| 426 | + name = packageName; |
| 427 | + value = coverageProject.hsPkgs.${packageName}.coverageReport; |
| 428 | + }]) (packageNames coverageProject)); |
| 429 | + } |
| 430 | + # Build the plan-nix and check it if materialized |
| 431 | + // lib.optionalAttrs (checkedProject ? plan-nix) { |
| 432 | + plan-nix = checkedProject.plan-nix; |
| 433 | + } |
| 434 | + # Build the stack-nix and check it if materialized |
| 435 | + // lib.optionalAttrs (checkedProject ? stack-nix) { |
| 436 | + stack-nix = checkedProject.stack-nix; |
| 437 | + }; |
417 | 438 | in {
|
418 | 439 | # Used by:
|
419 | 440 | # `nix build .#pkg-name:lib:pkg-name`
|
@@ -456,33 +477,11 @@ in {
|
456 | 477 | { name = "${packageName}:benchmark:${n}"; value = { type = "app"; program = v.exePath; }; })
|
457 | 478 | (package.components.benchmarks)
|
458 | 479 | ) (packageNames project));
|
459 |
| - # Used by hydra and cicero: |
460 |
| - hydraJobs = |
461 |
| - prefixAttrs "checks:" checks |
462 |
| - |
463 |
| - # Build the plan-nix and check it if materialized |
464 |
| - // lib.optionalAttrs (checkedProject ? plan-nix) { |
465 |
| - plan-nix = checkedProject.plan-nix; |
466 |
| - } |
467 |
| - |
468 |
| - # Build the stack-nix and check it if materialized |
469 |
| - // lib.optionalAttrs (checkedProject ? stack-nix) { |
470 |
| - stack-nix = checkedProject.stack-nix; |
471 |
| - } |
472 |
| - |
473 |
| - // { |
474 |
| - # Build tools and cache tools needed for the project |
475 |
| - inherit (project) roots; |
476 |
| - # Also build and cache any tools in the `devShell` |
477 |
| - devShell = project.shell; |
478 |
| - } |
479 |
| - |
480 |
| - # Run HPC on the tests |
481 |
| - // builtins.listToAttrs (lib.concatMap (packageName: [{ |
482 |
| - name = "coverage:" + packageName; |
483 |
| - value = coverageProject.hsPkgs.${packageName}.coverageReport; |
484 |
| - }]) (packageNames coverageProject)) |
485 |
| - ; |
| 480 | + # Used by hydra. |
| 481 | + hydraJobs = ciJobs; |
| 482 | + # Like `hydraJobs` but with system first so that it the IFDs will not have |
| 483 | + # to form systems we are not testing. |
| 484 | + inherit ciJobs; |
486 | 485 | devShells.default = project.shell;
|
487 | 486 | devShell = project.shell;
|
488 | 487 | };
|
|
0 commit comments