From d83ed68d9a50632b53d31802a54c2987a83b29db Mon Sep 17 00:00:00 2001 From: Luke Butters Date: Thu, 30 Apr 2026 14:53:15 +1000 Subject: [PATCH 1/5] If the test process wont die, don't fail the build just ignore it and proceed --- build/Build.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/build/Build.cs b/build/Build.cs index cf860a36b..e543c9993 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Xml; using JetBrains.Annotations; @@ -19,7 +20,6 @@ using Serilog; using static Nuke.Common.Tools.DotNet.DotNetTasks; -[ShutdownDotNetAfterServerBuild] partial class Build : NukeBuild { /// Support plugins are available for: @@ -323,4 +323,18 @@ void TarGZipCompress(AbsolutePath inputDirectory, string fileSpec, AbsolutePath } public static int Main() => Execute(x => x.Default); + + protected override void OnBuildFinished() + { + base.OnBuildFinished(); + try + { + var process = Process.Start("dotnet", "build-server shutdown"); + process?.WaitForExit(10_000); + } + catch (Exception e) + { + Log.Warning(e, "Failed to shut down dotnet build server — ignoring"); + } + } } From d7c834a005bc78c3b67e9a10e3644c5814557d96 Mon Sep 17 00:00:00 2001 From: Luke Butters Date: Thu, 30 Apr 2026 14:59:40 +1000 Subject: [PATCH 2/5] . --- build/Build.cs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/build/Build.cs b/build/Build.cs index e543c9993..4c88a1847 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; using System.Xml; using JetBrains.Annotations; @@ -323,18 +322,4 @@ void TarGZipCompress(AbsolutePath inputDirectory, string fileSpec, AbsolutePath } public static int Main() => Execute(x => x.Default); - - protected override void OnBuildFinished() - { - base.OnBuildFinished(); - try - { - var process = Process.Start("dotnet", "build-server shutdown"); - process?.WaitForExit(10_000); - } - catch (Exception e) - { - Log.Warning(e, "Failed to shut down dotnet build server — ignoring"); - } - } } From 715103b008b64d1b500927c9b80b69c19f139910 Mon Sep 17 00:00:00 2001 From: Luke Butters Date: Thu, 30 Apr 2026 15:05:47 +1000 Subject: [PATCH 3/5] . --- build/Build.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/Build.cs b/build/Build.cs index 4c88a1847..bc0094304 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -322,4 +322,11 @@ void TarGZipCompress(AbsolutePath inputDirectory, string fileSpec, AbsolutePath } public static int Main() => Execute(x => x.Default); + + protected override void OnBuildFinished() + { + base.OnBuildFinished(); + if (OperatingSystem.IsMacOS()) + DotNetBuildServerShutdown(); + } } From bbb0c4121e816632c2f95a28b4385a9d5fdafcfa Mon Sep 17 00:00:00 2001 From: Luke Butters Date: Thu, 30 Apr 2026 15:14:04 +1000 Subject: [PATCH 4/5] . --- build/Build.cs | 11 ++++------- build/_build.csproj | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/build/Build.cs b/build/Build.cs index bc0094304..64c90d841 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -19,6 +19,10 @@ using Serilog; using static Nuke.Common.Tools.DotNet.DotNetTasks; +// macOS build agents are persistent (non-ephemeral), so compiler server processes must be cleaned up between builds. +#if MACOS +[ShutdownDotNetAfterServerBuild] +#endif partial class Build : NukeBuild { /// Support plugins are available for: @@ -322,11 +326,4 @@ void TarGZipCompress(AbsolutePath inputDirectory, string fileSpec, AbsolutePath } public static int Main() => Execute(x => x.Default); - - protected override void OnBuildFinished() - { - base.OnBuildFinished(); - if (OperatingSystem.IsMacOS()) - DotNetBuildServerShutdown(); - } } diff --git a/build/_build.csproj b/build/_build.csproj index 80f35fe22..611439dd6 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -8,6 +8,7 @@ .. 1 enable + $(DefineConstants);MACOS From 3fafaa15cdf28149d3b6405d79158489938a4ae2 Mon Sep 17 00:00:00 2001 From: Luke Butters Date: Thu, 30 Apr 2026 15:14:51 +1000 Subject: [PATCH 5/5] . --- build/Build.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Build.cs b/build/Build.cs index 64c90d841..cff8b00e5 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -19,7 +19,7 @@ using Serilog; using static Nuke.Common.Tools.DotNet.DotNetTasks; -// macOS build agents are persistent (non-ephemeral), so compiler server processes must be cleaned up between builds. +// macOS build agents are persistent (non-ephemeral), so compiler server processes may need to be cleaned up between builds. #if MACOS [ShutdownDotNetAfterServerBuild] #endif