From 7529690364a3626691e93e5c2a9b1726e180dc67 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Tue, 24 Feb 2026 22:16:07 -0500 Subject: [PATCH 01/13] Net10 upgrade --- .devcontainer/devcontainer.json | 2 +- src/Runner.Common/Runner.Common.csproj | 5 +-- src/Runner.Listener/Runner.Listener.csproj | 3 +- .../Runner.PluginHost.csproj | 3 +- src/Runner.Plugins/Runner.Plugins.csproj | 2 +- src/Runner.Sdk/Runner.Sdk.csproj | 44 ++++++++++++++++--- src/Runner.Worker/Runner.Worker.csproj | 3 +- src/Sdk/Sdk.csproj | 8 +--- src/Test/Test.csproj | 3 +- src/dev.sh | 4 +- src/dir.proj | 35 +-------------- src/global.json | 2 +- 12 files changed, 49 insertions(+), 65 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2fd60937e41..e9f9c92dc95 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ "features": { "ghcr.io/devcontainers/features/docker-in-docker:1": {}, "ghcr.io/devcontainers/features/dotnet": { - "version": "8.0.418" + "version": "10.0.103" }, "ghcr.io/devcontainers/features/node:1": { "version": "20" diff --git a/src/Runner.Common/Runner.Common.csproj b/src/Runner.Common/Runner.Common.csproj index 6c4635626a2..3293b3c60c5 100644 --- a/src/Runner.Common/Runner.Common.csproj +++ b/src/Runner.Common/Runner.Common.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 Library win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true @@ -15,11 +15,8 @@ - - - diff --git a/src/Runner.Listener/Runner.Listener.csproj b/src/Runner.Listener/Runner.Listener.csproj index 68df8fbbc67..ad38dbed04b 100644 --- a/src/Runner.Listener/Runner.Listener.csproj +++ b/src/Runner.Listener/Runner.Listener.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 Exe win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true @@ -19,7 +19,6 @@ - diff --git a/src/Runner.PluginHost/Runner.PluginHost.csproj b/src/Runner.PluginHost/Runner.PluginHost.csproj index 81a8d2e4304..42de533dea4 100644 --- a/src/Runner.PluginHost/Runner.PluginHost.csproj +++ b/src/Runner.PluginHost/Runner.PluginHost.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 Exe win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true @@ -17,7 +17,6 @@ - diff --git a/src/Runner.Plugins/Runner.Plugins.csproj b/src/Runner.Plugins/Runner.Plugins.csproj index a786cf1cd1b..148fb00816f 100644 --- a/src/Runner.Plugins/Runner.Plugins.csproj +++ b/src/Runner.Plugins/Runner.Plugins.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 Library win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj index 55dbf12627c..d70f37f149e 100644 --- a/src/Runner.Sdk/Runner.Sdk.csproj +++ b/src/Runner.Sdk/Runner.Sdk.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 Library win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true @@ -10,14 +10,44 @@ $(Version) - - - + + + $(IntermediateOutputPath)Generated/ + $(GeneratedDir)BuildConstants.g.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + diff --git a/src/Runner.Worker/Runner.Worker.csproj b/src/Runner.Worker/Runner.Worker.csproj index 4470920e10c..687c32184cd 100644 --- a/src/Runner.Worker/Runner.Worker.csproj +++ b/src/Runner.Worker/Runner.Worker.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 Exe win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true @@ -21,7 +21,6 @@ - diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj index 644bf887ef7..7dd617abe05 100644 --- a/src/Sdk/Sdk.csproj +++ b/src/Sdk/Sdk.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 Library win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 @@ -19,18 +19,12 @@ - - - - - - diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj index a5a19aea7d1..a75a0f3dbdc 100644 --- a/src/Test/Test.csproj +++ b/src/Test/Test.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64 true NU1701;NU1603;NU1603;xUnit2013;SYSLIB0050;SYSLIB0051 @@ -19,7 +19,6 @@ - diff --git a/src/dev.sh b/src/dev.sh index 716fa08e677..ebcbbade52d 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -17,7 +17,7 @@ LAYOUT_DIR="$SCRIPT_DIR/../_layout" DOWNLOAD_DIR="$SCRIPT_DIR/../_downloads/netcore2x" PACKAGE_DIR="$SCRIPT_DIR/../_package" DOTNETSDK_ROOT="$SCRIPT_DIR/../_dotnetsdk" -DOTNETSDK_VERSION="8.0.418" +DOTNETSDK_VERSION="10.0.103" DOTNETSDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNETSDK_VERSION" RUNNER_VERSION=$(cat runnerversion) @@ -153,7 +153,7 @@ function runtest () ulimit -n 1024 fi - dotnet msbuild -t:test -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed "failed tests" + dotnet test -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" Test/Test.csproj || failed "failed tests" } function format() diff --git a/src/dir.proj b/src/dir.proj index 056a312e8f8..7dc02c39fb0 100644 --- a/src/dir.proj +++ b/src/dir.proj @@ -1,34 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -40,17 +12,12 @@ - + - - - - - diff --git a/src/global.json b/src/global.json index 519b109fa8a..058bafa625b 100644 --- a/src/global.json +++ b/src/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "8.0.418" + "version": "10.0.103" } } From e8c0112256659b6f58b7f303f2611abc4fe60e18 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Tue, 24 Feb 2026 22:17:06 -0500 Subject: [PATCH 02/13] Delete BuildConstants.cs as it's generated now --- src/Runner.Sdk/BuildConstants.cs | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 src/Runner.Sdk/BuildConstants.cs diff --git a/src/Runner.Sdk/BuildConstants.cs b/src/Runner.Sdk/BuildConstants.cs deleted file mode 100644 index 75fadfbdad0..00000000000 --- a/src/Runner.Sdk/BuildConstants.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace GitHub.Runner.Sdk -{ - /*** - * WARNING: This file is automatically regenerated on layout so the runner can provide version/commit info (do not manually edit it). - */ - public static class BuildConstants - { - public static class Source - { - public static readonly string CommitHash = "N/A"; - } - - public static class RunnerPackage - { - public static readonly string PackageName = "N/A"; - public static readonly string Version = "0"; - } - } -} From 35d3c95db904b7aaa83410103b884e33422d2efc Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Sat, 7 Mar 2026 21:49:01 -0500 Subject: [PATCH 03/13] Use source generator for BuildConstants --- src/ActionsRunner.sln | 92 ++++++++++++++++- .../BuildConstantsGenerator.cs | 98 +++++++++++++++++++ .../Runner.Sdk.Generator.csproj | 22 +++++ src/Runner.Sdk/Runner.Sdk.csproj | 46 +++------ 4 files changed, 222 insertions(+), 36 deletions(-) create mode 100644 src/Runner.Sdk.Generator/BuildConstantsGenerator.cs create mode 100644 src/Runner.Sdk.Generator/Runner.Sdk.Generator.csproj diff --git a/src/ActionsRunner.sln b/src/ActionsRunner.sln index fa0bfe0ed47..6e2dcdd22be 100644 --- a/src/ActionsRunner.sln +++ b/src/ActionsRunner.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29411.138 @@ -26,48 +26,138 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Runner.Sdk.Generator", "Runner.Sdk.Generator\Runner.Sdk.Generator.csproj", "{F78EAE57-001E-4B93-BD2E-5AE16D1A1524}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Debug|x64.ActiveCfg = Debug|Any CPU + {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Debug|x64.Build.0 = Debug|Any CPU + {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Debug|x86.ActiveCfg = Debug|Any CPU + {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Debug|x86.Build.0 = Debug|Any CPU {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Release|Any CPU.ActiveCfg = Release|Any CPU {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Release|Any CPU.Build.0 = Release|Any CPU + {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Release|x64.ActiveCfg = Release|Any CPU + {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Release|x64.Build.0 = Release|Any CPU + {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Release|x86.ActiveCfg = Release|Any CPU + {084289A3-CD7A-42E0-9219-4348B4B7E19B}.Release|x86.Build.0 = Release|Any CPU {7D461AEE-BF2A-4855-BD96-56921160B36A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7D461AEE-BF2A-4855-BD96-56921160B36A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D461AEE-BF2A-4855-BD96-56921160B36A}.Debug|x64.ActiveCfg = Debug|Any CPU + {7D461AEE-BF2A-4855-BD96-56921160B36A}.Debug|x64.Build.0 = Debug|Any CPU + {7D461AEE-BF2A-4855-BD96-56921160B36A}.Debug|x86.ActiveCfg = Debug|Any CPU + {7D461AEE-BF2A-4855-BD96-56921160B36A}.Debug|x86.Build.0 = Debug|Any CPU {7D461AEE-BF2A-4855-BD96-56921160B36A}.Release|Any CPU.ActiveCfg = Release|Any CPU {7D461AEE-BF2A-4855-BD96-56921160B36A}.Release|Any CPU.Build.0 = Release|Any CPU + {7D461AEE-BF2A-4855-BD96-56921160B36A}.Release|x64.ActiveCfg = Release|Any CPU + {7D461AEE-BF2A-4855-BD96-56921160B36A}.Release|x64.Build.0 = Release|Any CPU + {7D461AEE-BF2A-4855-BD96-56921160B36A}.Release|x86.ActiveCfg = Release|Any CPU + {7D461AEE-BF2A-4855-BD96-56921160B36A}.Release|x86.Build.0 = Release|Any CPU {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Debug|x64.ActiveCfg = Debug|Any CPU + {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Debug|x64.Build.0 = Debug|Any CPU + {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Debug|x86.ActiveCfg = Debug|Any CPU + {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Debug|x86.Build.0 = Debug|Any CPU {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Release|Any CPU.ActiveCfg = Release|Any CPU {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Release|Any CPU.Build.0 = Release|Any CPU + {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Release|x64.ActiveCfg = Release|Any CPU + {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Release|x64.Build.0 = Release|Any CPU + {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Release|x86.ActiveCfg = Release|Any CPU + {D0320EB1-CB6D-4179-BFDC-2F2B664A370C}.Release|x86.Build.0 = Release|Any CPU {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Debug|x64.ActiveCfg = Debug|Any CPU + {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Debug|x64.Build.0 = Debug|Any CPU + {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Debug|x86.ActiveCfg = Debug|Any CPU + {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Debug|x86.Build.0 = Debug|Any CPU {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Release|Any CPU.ActiveCfg = Release|Any CPU {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Release|Any CPU.Build.0 = Release|Any CPU + {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Release|x64.ActiveCfg = Release|Any CPU + {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Release|x64.Build.0 = Release|Any CPU + {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Release|x86.ActiveCfg = Release|Any CPU + {C23AFD6F-4DCD-4243-BC61-865BE31B9168}.Release|x86.Build.0 = Release|Any CPU {D0484633-DA97-4C34-8E47-1DADE212A57A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D0484633-DA97-4C34-8E47-1DADE212A57A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0484633-DA97-4C34-8E47-1DADE212A57A}.Debug|x64.ActiveCfg = Debug|Any CPU + {D0484633-DA97-4C34-8E47-1DADE212A57A}.Debug|x64.Build.0 = Debug|Any CPU + {D0484633-DA97-4C34-8E47-1DADE212A57A}.Debug|x86.ActiveCfg = Debug|Any CPU + {D0484633-DA97-4C34-8E47-1DADE212A57A}.Debug|x86.Build.0 = Debug|Any CPU {D0484633-DA97-4C34-8E47-1DADE212A57A}.Release|Any CPU.ActiveCfg = Release|Any CPU {D0484633-DA97-4C34-8E47-1DADE212A57A}.Release|Any CPU.Build.0 = Release|Any CPU + {D0484633-DA97-4C34-8E47-1DADE212A57A}.Release|x64.ActiveCfg = Release|Any CPU + {D0484633-DA97-4C34-8E47-1DADE212A57A}.Release|x64.Build.0 = Release|Any CPU + {D0484633-DA97-4C34-8E47-1DADE212A57A}.Release|x86.ActiveCfg = Release|Any CPU + {D0484633-DA97-4C34-8E47-1DADE212A57A}.Release|x86.Build.0 = Release|Any CPU {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Debug|x64.ActiveCfg = Debug|Any CPU + {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Debug|x64.Build.0 = Debug|Any CPU + {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Debug|x86.ActiveCfg = Debug|Any CPU + {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Debug|x86.Build.0 = Debug|Any CPU {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Release|Any CPU.ActiveCfg = Release|Any CPU {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Release|Any CPU.Build.0 = Release|Any CPU + {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Release|x64.ActiveCfg = Release|Any CPU + {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Release|x64.Build.0 = Release|Any CPU + {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Release|x86.ActiveCfg = Release|Any CPU + {D12EBD71-0464-46D0-8394-40BCFBA0A6F2}.Release|x86.Build.0 = Release|Any CPU {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Debug|x64.ActiveCfg = Debug|Any CPU + {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Debug|x64.Build.0 = Debug|Any CPU + {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Debug|x86.ActiveCfg = Debug|Any CPU + {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Debug|x86.Build.0 = Debug|Any CPU {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Release|Any CPU.Build.0 = Release|Any CPU + {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Release|x64.ActiveCfg = Release|Any CPU + {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Release|x64.Build.0 = Release|Any CPU + {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Release|x86.ActiveCfg = Release|Any CPU + {C2F5B9FA-2621-411F-8EB2-273ED276F503}.Release|x86.Build.0 = Release|Any CPU {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Debug|x64.ActiveCfg = Debug|Any CPU + {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Debug|x64.Build.0 = Debug|Any CPU + {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Debug|x86.ActiveCfg = Debug|Any CPU + {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Debug|x86.Build.0 = Debug|Any CPU {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Release|Any CPU.ActiveCfg = Release|Any CPU {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Release|Any CPU.Build.0 = Release|Any CPU + {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Release|x64.ActiveCfg = Release|Any CPU + {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Release|x64.Build.0 = Release|Any CPU + {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Release|x86.ActiveCfg = Release|Any CPU + {D2EE812B-E4DF-49BB-AE87-12BC49949B5F}.Release|x86.Build.0 = Release|Any CPU {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Debug|x64.ActiveCfg = Debug|Any CPU + {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Debug|x64.Build.0 = Debug|Any CPU + {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Debug|x86.ActiveCfg = Debug|Any CPU + {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Debug|x86.Build.0 = Debug|Any CPU {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Release|Any CPU.ActiveCfg = Release|Any CPU {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Release|Any CPU.Build.0 = Release|Any CPU + {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Release|x64.ActiveCfg = Release|Any CPU + {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Release|x64.Build.0 = Release|Any CPU + {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Release|x86.ActiveCfg = Release|Any CPU + {C932061F-F6A1-4F1E-B854-A6C6B30DC3EF}.Release|x86.Build.0 = Release|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Debug|x64.ActiveCfg = Debug|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Debug|x64.Build.0 = Debug|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Debug|x86.ActiveCfg = Debug|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Debug|x86.Build.0 = Debug|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Release|Any CPU.Build.0 = Release|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Release|x64.ActiveCfg = Release|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Release|x64.Build.0 = Release|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Release|x86.ActiveCfg = Release|Any CPU + {F78EAE57-001E-4B93-BD2E-5AE16D1A1524}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs b/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs new file mode 100644 index 00000000000..3a913a2cefb --- /dev/null +++ b/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs @@ -0,0 +1,98 @@ +using System; +using System.Diagnostics; +using System.Text; +using Microsoft.CodeAnalysis; + +namespace GitHub.Runner.Sdk.Generator +{ + [Generator] + public sealed class BuildConstantsGenerator : IIncrementalGenerator + { + private static readonly DiagnosticDescriptor GitFailedWarning = new DiagnosticDescriptor( + id: "RUNNER001", + title: "Git commit hash unavailable", + messageFormat: "Could not determine git commit hash: {0}. BuildConstants.Source.CommitHash will be empty.", + category: "BuildConstants", + defaultSeverity: DiagnosticSeverity.Warning, + isEnabledByDefault: true); + + public void Initialize(IncrementalGeneratorInitializationContext context) + { + // PackageRuntime and RunnerVersion come from MSBuild via . + // CommitHash is resolved here by running git directly. + IncrementalValueProvider<(string CommitHash, string? GitError, string PackageRuntime, string RunnerVersion)> props = + context.AnalyzerConfigOptionsProvider.Select((options, _) => + { + options.GlobalOptions.TryGetValue("build_property.MSBuildProjectDirectory", out string? projectDir); + options.GlobalOptions.TryGetValue("build_property.PackageRuntime", out string? packageRuntime); + options.GlobalOptions.TryGetValue("build_property.RunnerVersion", out string? runnerVersion); + (string commitHash, string? error) = GetGitCommitHash(projectDir ?? string.Empty); + return (commitHash, error, packageRuntime ?? string.Empty, runnerVersion ?? string.Empty); + }); + + context.RegisterSourceOutput(props, (ctx, values) => + { + if (values.GitError is not null) + { + ctx.ReportDiagnostic(Diagnostic.Create(GitFailedWarning, Location.None, values.GitError)); + } + ctx.AddSource("BuildConstants.g.cs", BuildSource(values.CommitHash, values.PackageRuntime, values.RunnerVersion)); + }); + } + + private static (string Hash, string? Error) GetGitCommitHash(string workingDirectory) + { + try + { + using var process = new Process + { + StartInfo = new ProcessStartInfo + { + FileName = "git", + Arguments = "rev-parse HEAD", + WorkingDirectory = workingDirectory, + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true, + } + }; + process.Start(); + string output = process.StandardOutput.ReadToEnd().Trim(); + string stderr = process.StandardError.ReadToEnd().Trim(); + process.WaitForExit(); + if (process.ExitCode == 0) + { + return (output, null); + } + return (string.Empty, string.IsNullOrEmpty(stderr) ? $"git exited with code {process.ExitCode}" : stderr); + } + catch (Exception ex) + { + return (string.Empty, ex.Message); + } + } + + private static string BuildSource(string commitHash, string packageRuntime, string runnerVersion) + { + var sb = new StringBuilder(); + sb.AppendLine("namespace GitHub.Runner.Sdk"); + sb.AppendLine("{"); + sb.AppendLine(" public static class BuildConstants"); + sb.AppendLine(" {"); + sb.AppendLine(" public static class Source"); + sb.AppendLine(" {"); + sb.AppendLine($" public static readonly string CommitHash = \"{commitHash}\";"); + sb.AppendLine(" }"); + sb.AppendLine(); + sb.AppendLine(" public static class RunnerPackage"); + sb.AppendLine(" {"); + sb.AppendLine($" public static readonly string PackageName = \"{packageRuntime}\";"); + sb.AppendLine($" public static readonly string Version = \"{runnerVersion}\";"); + sb.AppendLine(" }"); + sb.AppendLine(" }"); + sb.AppendLine("}"); + return sb.ToString(); + } + } +} diff --git a/src/Runner.Sdk.Generator/Runner.Sdk.Generator.csproj b/src/Runner.Sdk.Generator/Runner.Sdk.Generator.csproj new file mode 100644 index 00000000000..2a36b1218ed --- /dev/null +++ b/src/Runner.Sdk.Generator/Runner.Sdk.Generator.csproj @@ -0,0 +1,22 @@ + + + + netstandard2.0 + latest + enable + disable + + false + true + + RS2008;RS1035 + + + + + + + + + diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj index d70f37f149e..fcda5e40bc8 100644 --- a/src/Runner.Sdk/Runner.Sdk.csproj +++ b/src/Runner.Sdk/Runner.Sdk.csproj @@ -8,46 +8,22 @@ true NU1701;NU1603;SYSLIB0050;SYSLIB0051 $(Version) + true - - - $(IntermediateOutputPath)Generated/ - $(GeneratedDir)BuildConstants.g.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + From 1ef87395bad7a9059a5c32ddfdc5cab92e53bc90 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Sun, 8 Mar 2026 16:22:42 -0400 Subject: [PATCH 04/13] Moved git invocation to dev.sh --- .../BuildConstantsGenerator.cs | 66 +++++-------------- src/Runner.Sdk/Runner.Sdk.csproj | 1 + src/dev.sh | 17 ++--- 3 files changed, 26 insertions(+), 58 deletions(-) diff --git a/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs b/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs index 3a913a2cefb..4dec0fd75b3 100644 --- a/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs +++ b/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs @@ -1,76 +1,39 @@ -using System; -using System.Diagnostics; using System.Text; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Diagnostics; namespace GitHub.Runner.Sdk.Generator { [Generator] public sealed class BuildConstantsGenerator : IIncrementalGenerator { - private static readonly DiagnosticDescriptor GitFailedWarning = new DiagnosticDescriptor( - id: "RUNNER001", - title: "Git commit hash unavailable", - messageFormat: "Could not determine git commit hash: {0}. BuildConstants.Source.CommitHash will be empty.", - category: "BuildConstants", - defaultSeverity: DiagnosticSeverity.Warning, - isEnabledByDefault: true); - public void Initialize(IncrementalGeneratorInitializationContext context) { - // PackageRuntime and RunnerVersion come from MSBuild via . - // CommitHash is resolved here by running git directly. - IncrementalValueProvider<(string CommitHash, string? GitError, string PackageRuntime, string RunnerVersion)> props = + // CommitHash, PackageRuntime, and RunnerVersion come from MSBuild via . + IncrementalValueProvider<(string CommitHash, string PackageRuntime, string RunnerVersion)> props = context.AnalyzerConfigOptionsProvider.Select((options, _) => { - options.GlobalOptions.TryGetValue("build_property.MSBuildProjectDirectory", out string? projectDir); - options.GlobalOptions.TryGetValue("build_property.PackageRuntime", out string? packageRuntime); - options.GlobalOptions.TryGetValue("build_property.RunnerVersion", out string? runnerVersion); - (string commitHash, string? error) = GetGitCommitHash(projectDir ?? string.Empty); - return (commitHash, error, packageRuntime ?? string.Empty, runnerVersion ?? string.Empty); + string commitHash = ValueOrDefault(options.GlobalOptions, "build_property.CommitHash", "N/A"); + string packageRuntime = ValueOrDefault(options.GlobalOptions, "build_property.PackageRuntime", "N/A"); + string runnerVersion = ValueOrDefault(options.GlobalOptions, "build_property.RunnerVersion", "0"); + return (commitHash, packageRuntime, runnerVersion); }); context.RegisterSourceOutput(props, (ctx, values) => { - if (values.GitError is not null) - { - ctx.ReportDiagnostic(Diagnostic.Create(GitFailedWarning, Location.None, values.GitError)); - } ctx.AddSource("BuildConstants.g.cs", BuildSource(values.CommitHash, values.PackageRuntime, values.RunnerVersion)); }); } - private static (string Hash, string? Error) GetGitCommitHash(string workingDirectory) + private static string ValueOrDefault(AnalyzerConfigOptions options, string name, string defaultValue) { - try + options.TryGetValue(name, out string? value); + if (string.IsNullOrEmpty(value)) { - using var process = new Process - { - StartInfo = new ProcessStartInfo - { - FileName = "git", - Arguments = "rev-parse HEAD", - WorkingDirectory = workingDirectory, - RedirectStandardOutput = true, - RedirectStandardError = true, - UseShellExecute = false, - CreateNoWindow = true, - } - }; - process.Start(); - string output = process.StandardOutput.ReadToEnd().Trim(); - string stderr = process.StandardError.ReadToEnd().Trim(); - process.WaitForExit(); - if (process.ExitCode == 0) - { - return (output, null); - } - return (string.Empty, string.IsNullOrEmpty(stderr) ? $"git exited with code {process.ExitCode}" : stderr); - } - catch (Exception ex) - { - return (string.Empty, ex.Message); + return defaultValue; } + + return value!; } private static string BuildSource(string commitHash, string packageRuntime, string runnerVersion) @@ -78,6 +41,9 @@ private static string BuildSource(string commitHash, string packageRuntime, stri var sb = new StringBuilder(); sb.AppendLine("namespace GitHub.Runner.Sdk"); sb.AppendLine("{"); + sb.AppendLine(" /***"); + sb.AppendLine(" * WARNING: This file is automatically regenerated on layout so the runner can provide version/commit info (do not manually edit it)."); + sb.AppendLine(" */"); sb.AppendLine(" public static class BuildConstants"); sb.AppendLine(" {"); sb.AppendLine(" public static class Source"); diff --git a/src/Runner.Sdk/Runner.Sdk.csproj b/src/Runner.Sdk/Runner.Sdk.csproj index fcda5e40bc8..7cb27ceadef 100644 --- a/src/Runner.Sdk/Runner.Sdk.csproj +++ b/src/Runner.Sdk/Runner.Sdk.csproj @@ -16,6 +16,7 @@ + diff --git a/src/dev.sh b/src/dev.sh index ebcbbade52d..338bebbd7f9 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -20,6 +20,7 @@ DOTNETSDK_ROOT="$SCRIPT_DIR/../_dotnetsdk" DOTNETSDK_VERSION="10.0.103" DOTNETSDK_INSTALLDIR="$DOTNETSDK_ROOT/$DOTNETSDK_VERSION" RUNNER_VERSION=$(cat runnerversion) +GIT_COMMIT_HASH=$(git rev-parse HEAD) pushd "$SCRIPT_DIR" @@ -116,21 +117,21 @@ function heading() { echo echo - echo "-----------------------------------------" + echo "----------------------------------------------------------------------------------" echo " ${1}" - echo "-----------------------------------------" + echo "----------------------------------------------------------------------------------" } function build () { - heading "Building ..." - dotnet msbuild -t:Build -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build + heading "Building $RUNNER_VERSION: $GIT_COMMIT_HASH --- $RUNTIME_ID ..." + dotnet msbuild -t:Build -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" -p:CommitHash="${GIT_COMMIT_HASH}" ./dir.proj || failed build } function layout () { - heading "Create layout ..." - dotnet msbuild -t:layout -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" ./dir.proj || failed build + heading "Create $RUNNER_VERSION: $GIT_COMMIT_HASH --- $RUNTIME_ID ..." + dotnet msbuild -t:layout -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" -p:CommitHash="${GIT_COMMIT_HASH}" ./dir.proj || failed build #change execution flag to allow running with sudo if [[ ("$CURRENT_PLATFORM" == "linux") || ("$CURRENT_PLATFORM" == "darwin") ]]; then @@ -147,13 +148,13 @@ function layout () function runtest () { - heading "Testing ..." + heading "Testing $RUNNER_VERSION: $GIT_COMMIT_HASH --- $RUNTIME_ID ..." if [[ ("$CURRENT_PLATFORM" == "linux") || ("$CURRENT_PLATFORM" == "darwin") ]]; then ulimit -n 1024 fi - dotnet test -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" Test/Test.csproj || failed "failed tests" + dotnet test -p:PackageRuntime="${RUNTIME_ID}" -p:BUILDCONFIG="${BUILD_CONFIG}" -p:RunnerVersion="${RUNNER_VERSION}" -p:CommitHash="${GIT_COMMIT_HASH}" Test/Test.csproj || failed "failed tests" } function format() From f25f28ffb606b94d9393777f782c6ed69d07f957 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Sun, 8 Mar 2026 17:06:51 -0400 Subject: [PATCH 05/13] Clean generator project --- src/dir.proj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dir.proj b/src/dir.proj index 7dc02c39fb0..219ae1734a1 100644 --- a/src/dir.proj +++ b/src/dir.proj @@ -48,6 +48,8 @@ + + From 46e1757025946cb122a1cccf8894366a3d427fd0 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Sun, 8 Mar 2026 21:44:08 -0400 Subject: [PATCH 06/13] Be able to run tests in VSCode without dev.sh build/layout --- .../BuildConstantsGenerator.cs | 46 +++++++++++++++++-- src/Test/L0/ProcessExtensionL0.cs | 20 ++++++-- 2 files changed, 58 insertions(+), 8 deletions(-) diff --git a/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs b/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs index 4dec0fd75b3..ec59a53f313 100644 --- a/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs +++ b/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs @@ -1,3 +1,6 @@ +using System.Diagnostics; +using System.IO; +using System.Runtime.InteropServices; using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -13,9 +16,10 @@ public void Initialize(IncrementalGeneratorInitializationContext context) IncrementalValueProvider<(string CommitHash, string PackageRuntime, string RunnerVersion)> props = context.AnalyzerConfigOptionsProvider.Select((options, _) => { - string commitHash = ValueOrDefault(options.GlobalOptions, "build_property.CommitHash", "N/A"); - string packageRuntime = ValueOrDefault(options.GlobalOptions, "build_property.PackageRuntime", "N/A"); - string runnerVersion = ValueOrDefault(options.GlobalOptions, "build_property.RunnerVersion", "0"); + string projectDir = ValueOrDefault(options.GlobalOptions, "build_property.MSBuildProjectDirectory", ""); + string commitHash = ValueOrDefault(options.GlobalOptions, "build_property.CommitHash", GetCommitHash(projectDir)); + string packageRuntime = ValueOrDefault(options.GlobalOptions, "build_property.PackageRuntime", GetRuntimeId()); + string runnerVersion = ValueOrDefault(options.GlobalOptions, "build_property.RunnerVersion", GetRunnerVersion(projectDir)); return (commitHash, packageRuntime, runnerVersion); }); @@ -25,6 +29,42 @@ public void Initialize(IncrementalGeneratorInitializationContext context) }); } + private static string GetCommitHash(string projectDir) + { + using var process = Process.Start(new ProcessStartInfo("git", "rev-parse HEAD") + { + WorkingDirectory = projectDir, + RedirectStandardOutput = true, + UseShellExecute = false, + }); + return process.StandardOutput.ReadToEnd().Trim(); + } + + private static string GetRunnerVersion(string projectDir) + { + return File.ReadAllText(Path.Combine(projectDir, "..", "runnerversion")).Trim(); + } + + private static string GetRuntimeId() + { + string platform = "unknown"; + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + platform = "win"; + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + platform = "linux"; + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + platform = "osx"; + } + + return $"{platform}-{RuntimeInformation.OSArchitecture}".ToLowerInvariant(); + } + private static string ValueOrDefault(AnalyzerConfigOptions options, string name, string defaultValue) { options.TryGetValue(name, out string? value); diff --git a/src/Test/L0/ProcessExtensionL0.cs b/src/Test/L0/ProcessExtensionL0.cs index d650b4889ee..f773cb0e2f4 100644 --- a/src/Test/L0/ProcessExtensionL0.cs +++ b/src/Test/L0/ProcessExtensionL0.cs @@ -1,10 +1,7 @@ using System; -using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Threading; using System.Threading.Tasks; -using System.Linq; using Xunit; namespace GitHub.Runner.Common.Tests @@ -27,11 +24,12 @@ public async Task SuccessReadProcessEnv() try { #if OS_WINDOWS - string node = Path.Combine(TestUtil.GetSrcPath(), @"..\_layout\externals\node20\bin\node"); + string nodeFallback = Path.Combine(TestUtil.GetSrcPath(), @"..\_layout\externals\node20\bin\node.exe"); #else - string node = Path.Combine(TestUtil.GetSrcPath(), @"../_layout/externals/node20/bin/node"); hc.EnqueueInstance(new ProcessInvokerWrapper()); + string nodeFallback = Path.Combine(TestUtil.GetSrcPath(), @"../_layout/externals/node20/bin/node"); #endif + string node = FindInPath("node") ?? nodeFallback; var startInfo = new ProcessStartInfo(node, "-e \"setTimeout(function(){{}}, 15 * 1000);\""); startInfo.Environment[envName] = envValue; sleep = Process.Start(startInfo); @@ -66,5 +64,17 @@ public async Task SuccessReadProcessEnv() } } } + private static string FindInPath(string executable) + { + foreach (string dir in (Environment.GetEnvironmentVariable("PATH") ?? "").Split(Path.PathSeparator)) + { + string full = Path.Combine(dir, executable); + if (File.Exists(full)) + { + return full; + } + } + return null; + } } } From 679528e3e7126f6a717ad46b0d4753cc85ae569b Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Sun, 8 Mar 2026 21:44:36 -0400 Subject: [PATCH 07/13] Convert RunnerService project to SDK style --- .../Windows/RunnerService.csproj | 78 ++++--------------- 1 file changed, 16 insertions(+), 62 deletions(-) diff --git a/src/Runner.Service/Windows/RunnerService.csproj b/src/Runner.Service/Windows/RunnerService.csproj index ed43de7b06a..eb80c7d7e8d 100644 --- a/src/Runner.Service/Windows/RunnerService.csproj +++ b/src/Runner.Service/Windows/RunnerService.csproj @@ -1,89 +1,43 @@ - - - + + - Debug - AnyCPU - {D12EBD71-0464-46D0-8394-40BCFBA0A6F2} + net48 + net47 WinExe - Properties RunnerService RunnerService + false false - false - 512 true - - v4.8 - - - v4.7 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + + AppARM.config + - - - - - - - - + - + Component - + RunnerService.cs - - - + True True Resource.resx - - - - - - + - + ResXFileCodeGenerator Resource.Designer.cs - - + From beeeebad1e304551f7a5c5be53e337a0aebf5374 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Sun, 8 Mar 2026 22:10:37 -0400 Subject: [PATCH 08/13] Add csdevkit to the devcontainer --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e9f9c92dc95..38517d74ddd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,6 +18,7 @@ "extensions": [ "ms-azuretools.vscode-docker", "ms-dotnettools.csharp", + "ms-dotnettools.csdevkit", "eamodio.gitlens" ] } From 629f73b6f1c48e9fcf8c9fceefc6aef5ddce688b Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Mon, 9 Mar 2026 10:19:27 -0400 Subject: [PATCH 09/13] Use vs2026 for building windows --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd315411f3c..53b685f203a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,11 +44,11 @@ jobs: devScript: ./dev.sh - runtime: win-x64 - os: windows-latest + os: windows-2025-vs2026 devScript: ./dev - runtime: win-arm64 - os: windows-latest + os: windows-2025-vs2026 devScript: ./dev runs-on: ${{ matrix.os }} From 7351625b537404af4067aa1421ca96bd465dc422 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Mon, 9 Mar 2026 10:27:49 -0400 Subject: [PATCH 10/13] Adding restore for the RunnerService project --- src/dir.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dir.proj b/src/dir.proj index 219ae1734a1..1c97f01c85d 100644 --- a/src/dir.proj +++ b/src/dir.proj @@ -15,6 +15,7 @@ + From f4e23cbbed31aade471752709cb109d2aa3e2d4e Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Mon, 9 Mar 2026 10:34:57 -0400 Subject: [PATCH 11/13] Reverting to windows-latest --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53b685f203a..fd315411f3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,11 +44,11 @@ jobs: devScript: ./dev.sh - runtime: win-x64 - os: windows-2025-vs2026 + os: windows-latest devScript: ./dev - runtime: win-arm64 - os: windows-2025-vs2026 + os: windows-latest devScript: ./dev runs-on: ${{ matrix.os }} From cba9f617ae901bb479661ac82d28efb4fc33dd71 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Mon, 9 Mar 2026 10:46:44 -0400 Subject: [PATCH 12/13] Copilot feedback --- src/Runner.Sdk.Generator/BuildConstantsGenerator.cs | 13 +++++++------ src/Test/L0/ProcessExtensionL0.cs | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs b/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs index ec59a53f313..e07e4f9e70f 100644 --- a/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs +++ b/src/Runner.Sdk.Generator/BuildConstantsGenerator.cs @@ -1,3 +1,4 @@ +using System; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; @@ -16,10 +17,10 @@ public void Initialize(IncrementalGeneratorInitializationContext context) IncrementalValueProvider<(string CommitHash, string PackageRuntime, string RunnerVersion)> props = context.AnalyzerConfigOptionsProvider.Select((options, _) => { - string projectDir = ValueOrDefault(options.GlobalOptions, "build_property.MSBuildProjectDirectory", ""); - string commitHash = ValueOrDefault(options.GlobalOptions, "build_property.CommitHash", GetCommitHash(projectDir)); - string packageRuntime = ValueOrDefault(options.GlobalOptions, "build_property.PackageRuntime", GetRuntimeId()); - string runnerVersion = ValueOrDefault(options.GlobalOptions, "build_property.RunnerVersion", GetRunnerVersion(projectDir)); + string projectDir = ValueOrDefault(options.GlobalOptions, "build_property.MSBuildProjectDirectory", () => string.Empty); + string commitHash = ValueOrDefault(options.GlobalOptions, "build_property.CommitHash", () => GetCommitHash(projectDir)); + string packageRuntime = ValueOrDefault(options.GlobalOptions, "build_property.PackageRuntime", () => GetRuntimeId()); + string runnerVersion = ValueOrDefault(options.GlobalOptions, "build_property.RunnerVersion", () => GetRunnerVersion(projectDir)); return (commitHash, packageRuntime, runnerVersion); }); @@ -65,12 +66,12 @@ private static string GetRuntimeId() return $"{platform}-{RuntimeInformation.OSArchitecture}".ToLowerInvariant(); } - private static string ValueOrDefault(AnalyzerConfigOptions options, string name, string defaultValue) + private static string ValueOrDefault(AnalyzerConfigOptions options, string name, Func getDefaultValue) { options.TryGetValue(name, out string? value); if (string.IsNullOrEmpty(value)) { - return defaultValue; + return getDefaultValue(); } return value!; diff --git a/src/Test/L0/ProcessExtensionL0.cs b/src/Test/L0/ProcessExtensionL0.cs index f773cb0e2f4..4b6614e36da 100644 --- a/src/Test/L0/ProcessExtensionL0.cs +++ b/src/Test/L0/ProcessExtensionL0.cs @@ -24,12 +24,13 @@ public async Task SuccessReadProcessEnv() try { #if OS_WINDOWS - string nodeFallback = Path.Combine(TestUtil.GetSrcPath(), @"..\_layout\externals\node20\bin\node.exe"); + string nodeExec = "node.exe" #else hc.EnqueueInstance(new ProcessInvokerWrapper()); - string nodeFallback = Path.Combine(TestUtil.GetSrcPath(), @"../_layout/externals/node20/bin/node"); + string nodeExec = "node"; #endif - string node = FindInPath("node") ?? nodeFallback; + string nodeFallback = Path.Combine(TestUtil.GetSrcPath(), "..", "_layout", "externals", "node20", "bin", nodeExec); + string node = FindInPath(nodeExec) ?? nodeFallback; var startInfo = new ProcessStartInfo(node, "-e \"setTimeout(function(){{}}, 15 * 1000);\""); startInfo.Environment[envName] = envValue; sleep = Process.Start(startInfo); From 910429e3b23c66ef53154602b1789f54750f7330 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Mon, 9 Mar 2026 10:53:42 -0400 Subject: [PATCH 13/13] Added missing semicolon --- src/Test/L0/ProcessExtensionL0.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Test/L0/ProcessExtensionL0.cs b/src/Test/L0/ProcessExtensionL0.cs index 4b6614e36da..283c47fd498 100644 --- a/src/Test/L0/ProcessExtensionL0.cs +++ b/src/Test/L0/ProcessExtensionL0.cs @@ -24,7 +24,7 @@ public async Task SuccessReadProcessEnv() try { #if OS_WINDOWS - string nodeExec = "node.exe" + string nodeExec = "node.exe"; #else hc.EnqueueInstance(new ProcessInvokerWrapper()); string nodeExec = "node";