From 9a01d807fb9779dd826dfa24b382f7a7051f9a8b Mon Sep 17 00:00:00 2001 From: chavic Date: Thu, 9 Jul 2026 20:51:57 +0200 Subject: [PATCH 1/3] Use the binary dotnet SDK in Darwin dev shells The csharp dev shell takes dotnetCorePackages.sdk_10_0, which resolves to the source-built VMR SDK. The public nix cache has no Darwin binaries for the VMR, so every uncached realization compiles the entire .NET SDK from source. On CI this dominates the macOS csharp job: of a 2h29m run, nix develop spent 2h24m building dotnet-vmr derivations while the actual work took under five minutes (cargo build 4m09s, bindings generation 2s, dotnet test 8s). macOS contributors pay the same cost on their first nix develop .#csharp. Use the Microsoft-binary SDK on Darwin instead; it satisfies the same global.json band (10.0.1xx) and keeps the share/dotnet layout DOTNET_ROOT expects. Linux keeps the source-built SDK, which hydra serves from cache. --- flake.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 7cdf44c5e..6afbfdf41 100644 --- a/flake.nix +++ b/flake.nix @@ -259,7 +259,16 @@ "payjoin-mailroom-image" = mkContainerImage "payjoin-mailroom" packages.payjoin-mailroom tag; }; - dotnetSdk = pkgs.dotnetCorePackages.sdk_10_0; + # On Darwin the default sdk_10_0 resolves to the source-built VMR, which has + # no binaries in the public nix cache: every uncached realization compiles + # the entire .NET SDK from source (hours on CI runners and contributor + # machines). Use the Microsoft-binary SDK there; Linux keeps the + # source-built SDK, which hydra serves from cache. + dotnetSdk = + if pkgs.stdenv.isDarwin then + pkgs.dotnetCorePackages.sdk_10_0_1xx-bin + else + pkgs.dotnetCorePackages.sdk_10_0; devShells = builtins.mapAttrs ( _name: craneLib: From 95c6a6c3197cd8492840cece52d32c94a8bf5bf1 Mon Sep 17 00:00:00 2001 From: chavic Date: Thu, 9 Jul 2026 21:14:33 +0200 Subject: [PATCH 2/3] Trigger csharp CI on flake changes The unix csharp jobs run inside the flake's csharp dev shell, so a flake change alters this workflow's environment without running it. Include the flake in the path filter; it also lets this branch's dev shell change demonstrate its effect on the macOS job time. --- .github/workflows/csharp.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.yml index b4c1817a2..b1f2d7b3b 100644 --- a/.github/workflows/csharp.yml +++ b/.github/workflows/csharp.yml @@ -8,6 +8,10 @@ on: pull_request: paths: - payjoin-ffi/** + # The unix jobs run inside the flake's csharp dev shell, so changes to + # the flake change this workflow's environment. + - flake.nix + - flake.lock jobs: build-csharp-and-test-unix: From 1d8fe17c8de4f4275e224e44e43779926c61197c Mon Sep 17 00:00:00 2001 From: chavic Date: Thu, 9 Jul 2026 21:21:39 +0200 Subject: [PATCH 3/3] Trigger all bindings CI on flake changes The dart, javascript and python jobs run inside flake dev shells, same as csharp: a flake change alters their environment without running them. Give them the same flake path filter. --- .github/workflows/dart.yml | 4 ++++ .github/workflows/javascript.yml | 4 ++++ .github/workflows/python.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 801f726cc..115af707b 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -8,6 +8,10 @@ on: pull_request: paths: - payjoin-ffi/** + # The jobs run inside the flake's dev shell, so changes to the flake + # change this workflow's environment. + - flake.nix + - flake.lock jobs: build-dart-and-test: diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index 28c46fc1a..c116525ca 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -8,6 +8,10 @@ on: pull_request: paths: - payjoin-ffi/** + # The jobs run inside the flake's dev shell, so changes to the flake + # change this workflow's environment. + - flake.nix + - flake.lock jobs: build-js-and-test: diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b44cfc8f1..f66644b9a 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -8,6 +8,10 @@ on: pull_request: paths: - payjoin-ffi/** + # The jobs run inside the flake's dev shell, so changes to the flake + # change this workflow's environment. + - flake.nix + - flake.lock jobs: build-python-and-test: