From c3c069734defe7be7ca4c65a7578d87e84955113 Mon Sep 17 00:00:00 2001 From: ners Date: Sat, 16 Nov 2024 13:00:01 +0100 Subject: [PATCH] Build monad-schedule without parallelism in CI --- .github/workflows/ci.yml | 5 ++++- flake.lock | 6 +++--- flake.nix | 12 +++++++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 132035d7..5eac7f1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,7 +132,10 @@ jobs: - name: Flake check run: nix flake check - name: Build all packages - run: nix build --accept-flake-config + run: | + # Pre-build monad-schedule without parallelism to avoid timing issues under load + nix build --accept-flake-config --max-jobs 1 .#monad-schedule-lib + nix build --accept-flake-config - name: Run tests run: | nix develop --accept-flake-config -c cabal update diff --git a/flake.lock b/flake.lock index 7e6dd274..44e5fee5 100644 --- a/flake.lock +++ b/flake.lock @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1731569569, - "narHash": "sha256-yUjNI34R68uLg95nHzINg8ulpL77p4kOqUsCkMm1F28=", + "lastModified": 1731745710, + "narHash": "sha256-SVeiClbgqL071JpAspOu0gCkPSAL51kSIRwo4C/pghA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7f2d3d2febedabd8f5c9761373c99b9dcfa917e1", + "rev": "dfaa4cb76c2d450d8f396bb6b9f43cede3ade129", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 63909265..e226d8d6 100644 --- a/flake.nix +++ b/flake.nix @@ -64,9 +64,6 @@ } { }; }) - (hfinal: hprev: lib.optionalAttrs prev.stdenv.isDarwin { - monad-schedule = dontCheck hprev.monad-schedule; - }) (hfinal: hprev: lib.optionalAttrs (lib.versionOlder hprev.ghc.version "9.4") { time-domain = doJailbreak hprev.time-domain; }) @@ -142,6 +139,14 @@ (prev.linkFarm "docsAndSdist" { docs = final.rhine-docs; sdist = rhine-sdist; }) ]; }; + + # All monad-schedule libraries + monad-schedule-lib = prev.buildEnv + { + name = "monad-schedule-lib"; + paths = map (hp: hp.monad-schedule) (attrValues hps); + pathsToLink = [ "/lib" ]; + }; }; overlay = lib.composeManyExtensions @@ -165,6 +170,7 @@ # Usage: nix build packages = forAllPlatforms (system: pkgs: { default = pkgs.rhine-all; + monad-schedule = pkgs.monad-schedule-lib; }); # We re-export the entire nixpkgs package set with our overlay.