Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the V4 build working once again #1543

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "2.3.0",
"version": "5.0.0",
"commands": [
"dotnet-cake"
]
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/NUnitConsoleAndEngine.CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: NUnitConsoleAndEngine.CI

on:
workflow_dispatch:
pull_request:
push:
branches-ignore:
- "azure-*"
paths-ignore:
- "*.txt"
- "*.md"

env:
DOTNET_NOLOGO: true # Disable the .NET logo
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry

jobs:
ContinuousIntegration:
name: Continuous Integration
runs-on: windows-latest

env:
MYGET_API_KEY: ${{ secrets.PUBLISH_MYGET_ORG }}
NUGET_API_KEY: ${{ secrets.PUBLISH_NUGET_ORG }}
CHOCO_API_KEY: ${{ secrets.PUBLISH_CHOCOLATEY_ORG }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_CP }}

steps:
- name: ⤵️ Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🛠️ Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.x
8.0.100

- name: 🔧 Install dotnet tools
run: dotnet tool restore

- name: 🍰 Run cake
env:
MYGET_API_KEY: ${{ secrets.PUBLISH_MYGET_ORG }}
NUGET_API_KEY: ${{ secrets.PUBLISH_NUGET_ORG }}
CHOCO_API_KEY: ${{ secrets.PUBLISH_CHOCOLATEY_ORG }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_CP }}

# If you need to get more verbose logging, add the following to the dotnet-cake above: --verbosity=diagnostic
run: dotnet cake --target=ContinuousIntegration --configuration=Release

- name: 🪵 Upload build logs
if: always()
uses: actions/upload-artifact@v4
with:
name: NUnitConsoleLogs
# This path is defined in build-settings.cake
path: "build-results/*.binlog"
# if-no-files-found: error

- name: 🪵 Upload InternalTrace logs
if: always()
uses: actions/upload-artifact@v4
with:
name: InternalTraceLogs
# This path is defined in build-settings.cake
path: "*.log"
# if-no-files-found: error

- name: 💾 Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: "Test Results"
path: test-results
33 changes: 33 additions & 0 deletions .github/workflows/PublishDraftRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Draft Release on GitHub

on:
workflow_dispatch:
inputs:
packageVersion:
description: "Package version for release (must match an existing milestone)"
required: true
type: string

jobs:
draft-release:
runs-on: ubuntu-latest

steps:
- name: ⤵️ Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🛠️ Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.100

- name: 🛠️ Install dotnet tools
run: dotnet tool restore

- name: 🔨 Create Draft Release
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_CP }}

run: dotnet cake --target=CreateDraftRelease --packageVersion="${{ inputs.packageVersion }}"
34 changes: 13 additions & 21 deletions NUnitConsole.sln
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestData", "TestData", "{37
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "agents", "agents", "{1704B7B2-5AD3-44EA-AB26-445C4E4E2C54}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net20-x86", "src\NUnitEngine\agents\nunit-agent-net20-x86\nunit-agent-net20-x86.csproj", "{19466BDC-EDC2-40B0-AD11-C4C10CE9E289}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net20", "src\NUnitEngine\agents\nunit-agent-net20\nunit-agent-net20.csproj", "{A4801564-5283-4731-BC81-40DD0928C1C8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-netcore31", "src\NUnitEngine\agents\nunit-agent-netcore31\nunit-agent-netcore31.csproj", "{59D49E52-E0E9-4AB8-BB61-19DF909723CE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net50", "src\NUnitEngine\agents\nunit-agent-net50\nunit-agent-net50.csproj", "{EC6BB254-3F26-4276-A00B-5FAE78ED11B2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net60", "src\NUnitEngine\agents\nunit-agent-net60\nunit-agent-net60.csproj", "{D5CC541C-95B7-4CB4-AADD-660FDCC281B8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit-agent-net462", "src\NUnitEngine\agents\nunit-agent-net462\nunit-agent-net462.csproj", "{E4041712-A1F1-479D-A7F7-89F491066163}"
Expand Down Expand Up @@ -146,6 +140,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cake", "cake", "{8D54099B-F
cake\versioning.cake = cake\versioning.cake
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{B25157A1-B3CD-40FB-89F2-A7206C0B553A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{9375E2BF-5AF9-4773-A5D1-EA16D9006940}"
ProjectSection(SolutionItems) = preProject
.github\workflows\NUnitConsoleAndEngine.CI.yml = .github\workflows\NUnitConsoleAndEngine.CI.yml
.github\workflows\PublishDraftRelease.yml = .github\workflows\PublishDraftRelease.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{0F76DA4A-58B9-4B45-BEC5-259105570D11}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -188,22 +192,10 @@ Global
{E9C5FA69-52D3-44CC-A54F-1F8A49BF7CF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9C5FA69-52D3-44CC-A54F-1F8A49BF7CF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9C5FA69-52D3-44CC-A54F-1F8A49BF7CF5}.Release|Any CPU.Build.0 = Release|Any CPU
{19466BDC-EDC2-40B0-AD11-C4C10CE9E289}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19466BDC-EDC2-40B0-AD11-C4C10CE9E289}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19466BDC-EDC2-40B0-AD11-C4C10CE9E289}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19466BDC-EDC2-40B0-AD11-C4C10CE9E289}.Release|Any CPU.Build.0 = Release|Any CPU
{A4801564-5283-4731-BC81-40DD0928C1C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4801564-5283-4731-BC81-40DD0928C1C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4801564-5283-4731-BC81-40DD0928C1C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4801564-5283-4731-BC81-40DD0928C1C8}.Release|Any CPU.Build.0 = Release|Any CPU
{59D49E52-E0E9-4AB8-BB61-19DF909723CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59D49E52-E0E9-4AB8-BB61-19DF909723CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59D49E52-E0E9-4AB8-BB61-19DF909723CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59D49E52-E0E9-4AB8-BB61-19DF909723CE}.Release|Any CPU.Build.0 = Release|Any CPU
{EC6BB254-3F26-4276-A00B-5FAE78ED11B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC6BB254-3F26-4276-A00B-5FAE78ED11B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC6BB254-3F26-4276-A00B-5FAE78ED11B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC6BB254-3F26-4276-A00B-5FAE78ED11B2}.Release|Any CPU.Build.0 = Release|Any CPU
{D5CC541C-95B7-4CB4-AADD-660FDCC281B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5CC541C-95B7-4CB4-AADD-660FDCC281B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5CC541C-95B7-4CB4-AADD-660FDCC281B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -263,10 +255,7 @@ Global
{CACC0520-B452-4310-A33C-DC944129ACDD} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{E9C5FA69-52D3-44CC-A54F-1F8A49BF7CF5} = {37D508B2-91E0-4B32-869B-DFF9E68EA213}
{1704B7B2-5AD3-44EA-AB26-445C4E4E2C54} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{19466BDC-EDC2-40B0-AD11-C4C10CE9E289} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54}
{A4801564-5283-4731-BC81-40DD0928C1C8} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54}
{59D49E52-E0E9-4AB8-BB61-19DF909723CE} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54}
{EC6BB254-3F26-4276-A00B-5FAE78ED11B2} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54}
{D5CC541C-95B7-4CB4-AADD-660FDCC281B8} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54}
{E4041712-A1F1-479D-A7F7-89F491066163} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54}
{D4AE483A-D4E1-4892-AF87-3607FBA8755F} = {1704B7B2-5AD3-44EA-AB26-445C4E4E2C54}
Expand All @@ -277,6 +266,9 @@ Global
{7CD5F602-368E-41E3-8C61-42093CB12D70} = {37D508B2-91E0-4B32-869B-DFF9E68EA213}
{5BD1B0BA-6DD3-4619-B5E0-4FFF19F941C2} = {37D508B2-91E0-4B32-869B-DFF9E68EA213}
{8D54099B-F770-47C7-91A0-8348FF271E2A} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{B25157A1-B3CD-40FB-89F2-A7206C0B553A} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{9375E2BF-5AF9-4773-A5D1-EA16D9006940} = {B25157A1-B3CD-40FB-89F2-A7206C0B553A}
{0F76DA4A-58B9-4B45-BEC5-259105570D11} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D8E4FC26-5422-4C51-8BBC-D1AC0A578711}
Expand Down
73 changes: 37 additions & 36 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ static string Target; Target = Argument("target", Argument("t", "Default"));

// Install Tools
#tool NuGet.CommandLine&version=6.0.0
#tool dotnet:?package=GitVersion.Tool&version=5.6.3
#tool dotnet:?package=GitReleaseManager.Tool&version=0.12.1
#tool dotnet:?package=GitVersion.Tool&version=5.12.0
#tool dotnet:?package=GitReleaseManager.Tool&version=0.17.0

var UnreportedErrors = new List<string>();
var installedNetCoreRuntimes = GetInstalledNetCoreRuntimes();
Expand Down Expand Up @@ -183,81 +183,81 @@ Task("CheckForTestErrors")
.Does(() => DisplayUnreportedErrors());

//////////////////////////////////////////////////////////////////////
// TEST .NET 2.0 ENGINE CORE
// TEST .NET 4.6.2 ENGINE CORE
//////////////////////////////////////////////////////////////////////

Task("TestNet20EngineCore")
.Description("Tests the engine core assembly")
Task("TestNet462EngineCore")
.Description("Tests the Net 4.6.2 engine core assembly")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does<BuildSettings>(settings =>
{
RunNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, settings.Configuration, "net35");
RunNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, settings.Configuration, "net462");
});

//////////////////////////////////////////////////////////////////////
// TEST NETSTANDARD 2.0 ENGINE CORE
// TEST .NET CORE 3.1 ENGINE CORE
//////////////////////////////////////////////////////////////////////

Task("TestNetStandard20EngineCore")
.Description("Tests the .NET Standard Engine core assembly")
Task("TestNetCore31EngineCore")
.Description("Tests the .NET Core 3.1 Engine core assembly")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does<BuildSettings>(settings =>
{
RunDotnetNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, settings.Configuration, "netcoreapp2.1");
RunDotnetNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, settings.Configuration, "netcoreapp3.1");
});

//////////////////////////////////////////////////////////////////////
// TEST NETCORE 3.1 ENGINE CORE
// TEST .NET 6.0 ENGINE CORE
//////////////////////////////////////////////////////////////////////

Task("TestNetCore31EngineCore")
.Description("Tests the .NET Core 3.1 Engine core assembly")
Task("TestNet60EngineCore")
.Description("Tests the .NET 6.0 Engine core assembly")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does<BuildSettings>(settings =>
{
RunDotnetNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, settings.Configuration, "netcoreapp3.1");
RunDotnetNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, settings.Configuration, "net6.0");
});

//////////////////////////////////////////////////////////////////////
// TEST .NET Framework ENGINE
// TEST .NET 8.0 ENGINE CORE
//////////////////////////////////////////////////////////////////////

Task("TestNetFxEngine")
.Description("Tests the NETFX 4.6.2 engine")
Task("TestNet80EngineCore")
.Description("Tests the .NET 8.0 Engine core assembly")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does<BuildSettings>(settings =>
{
RunNUnitLiteTests(ENGINE_TESTS_PROJECT, settings.Configuration, "net462");
RunDotnetNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, settings.Configuration, "net8.0");
});

//////////////////////////////////////////////////////////////////////
// TEST NETSTANDARD 2.0 ENGINE
// TEST .NET Framework ENGINE
//////////////////////////////////////////////////////////////////////

Task("TestNetStandard20Engine")
.Description("Tests the .NET Standard Engine")
Task("TestNetFxEngine")
.Description("Tests the NETFX 4.6.2 engine")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does<BuildSettings>(settings =>
{
RunDotnetNUnitLiteTests(ENGINE_TESTS_PROJECT, settings.Configuration, "netcoreapp2.1");
RunNUnitLiteTests(ENGINE_TESTS_PROJECT, settings.Configuration, "net462");
});

//////////////////////////////////////////////////////////////////////
// TEST NETCORE 3.1 ENGINE
// TEST NETCORE ENGINE
//////////////////////////////////////////////////////////////////////

Task("TestNetCore31Engine")
.Description("Tests the .NET Core 3.1 Engine")
Task("TestNetCoreEngine")
.Description("Tests the .NET Core 8.0 Engine")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does<BuildSettings>(settings =>
{
RunDotnetNUnitLiteTests(ENGINE_TESTS_PROJECT, settings.Configuration, "netcoreapp3.1");
RunDotnetNUnitLiteTests(ENGINE_TESTS_PROJECT, settings.Configuration, "net8.0");
});

//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -345,7 +345,7 @@ Task("PackageExistingBuild")
.IsDependentOn("PackageConsoleRunner")
.IsDependentOn("PackageDotNetConsoleRunner")
.IsDependentOn("PackageChocolateyConsoleRunner")
.IsDependentOn("PackageMsi")
//.IsDependentOn("PackageMsi")
.IsDependentOn("PackageZip")
.IsDependentOn("PackageEngine")
.IsDependentOn("PackageEngineApi");
Expand Down Expand Up @@ -712,15 +712,15 @@ Task("TestConsole")

Task("TestEngineCore")
.Description("Builds and tests the engine core assembly")
.IsDependentOn("TestNet20EngineCore")
//.IsDependentOn("TestNetStandard20EngineCore")
.IsDependentOn("TestNetCore31EngineCore");
.IsDependentOn("TestNet462EngineCore")
.IsDependentOn("TestNetCore31EngineCore")
.IsDependentOn("TestNet60EngineCore")
.IsDependentOn("TestNet80EngineCore");

Task("TestEngine")
.Description("Builds and tests the engine assembly")
.IsDependentOn("TestNetFxEngine")
//.IsDependentOn("TestNetStandard20Engine")
.IsDependentOn("TestNetCore31Engine");
.IsDependentOn("TestNetCoreEngine");

Task("Test")
.Description("Builds and tests the engine and console runner")
Expand All @@ -740,10 +740,11 @@ Task("BuildTestAndPackage")
.IsDependentOn("Test")
.IsDependentOn("PackageExistingBuild");

Task("Appveyor")
.Description("Target we run in our AppVeyor CI")
.IsDependentOn("DotnetInfo")
.IsDependentOn("BuildTestAndPackage")
Task("ContinuousIntegration")
.Description("Perform continuous integration run")
.IsDependentOn("Build")
.IsDependentOn("Test")
.IsDependentOn("Package")
.IsDependentOn("PublishPackages")
.IsDependentOn("CreateDraftRelease")
.IsDependentOn("CreateProductionRelease");
Expand Down
Loading
Loading