Skip to content
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": {
"nuke.globaltool": {
"version": "6.0.3",
"version": "10.1.0",
"commands": [
"nuke"
]
Expand Down
180 changes: 92 additions & 88 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,56 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Clean",
"Compile",
"CompileDotNet",
"CompileNetFramework",
"CopyToLocalPackages",
"Default",
"Pack",
"PackTestPortForwarder",
"Restore",
"TestLinux",
"TestWindows",
"TestWindowsDotNet",
"TestWindowsNetFramework"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"AutoDetectBranch": {
"type": "boolean",
"description": "Whether to auto-detect the branch name - this is okay for a local build, but should not be used under CI"
},
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
Expand All @@ -27,34 +60,13 @@
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"OCTOVERSION_CurrentBranch": {
"type": "string",
"description": "Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable OCTOVERSION_CurrentBranch"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
Expand All @@ -74,73 +86,65 @@
"type": "string",
"description": "Root directory during build execution"
},
"RunDotMemoryTests": {
"type": "boolean",
"description": "True if dot memory tests should be run, otherwise false. Default to True for Windows and False for Linux"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"CompileNet48",
"CompileNet80",
"CopyToLocalPackages",
"Default",
"Pack",
"PackTestPortForwarder",
"Restore",
"TestLinux",
"TestWindows",
"TestWindowsNet48",
"TestWindowsNet80"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"CompileNet48",
"CompileNet80",
"CopyToLocalPackages",
"Default",
"Pack",
"PackTestPortForwarder",
"Restore",
"TestLinux",
"TestWindows",
"TestWindowsNet48",
"TestWindowsNet80"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"TestFilter": {
"type": "string",
"description": "The test Filter passed to dotnet test e.g. TestCategory=Async"
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{
"properties": {
"AutoDetectBranch": {
"type": "boolean",
"description": "Whether to auto-detect the branch name - this is okay for a local build, but should not be used under CI"
},
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
"Debug",
"Release"
]
},
"OCTOVERSION_CurrentBranch": {
"type": "string",
"description": "Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable OCTOVERSION_CurrentBranch"
},
"RunDotMemoryTests": {
"type": [
"boolean",
"null"
],
"description": "True if dot memory tests should be run, otherwise false. Default to True for Windows and False for Linux"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"TestFilter": {
"type": "string",
"description": "The test Filter passed to dotnet test e.g. TestCategory=Async"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
}
]
}
13 changes: 6 additions & 7 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Nuke.Common.Tools.OctoVersion;
using Nuke.Common.Utilities;
using Nuke.Common.Utilities.Collections;
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.Tools.DotMemoryUnit.DotMemoryUnitTasks;
using static Nuke.Common.Tools.DotNet.DotNetTasks;

Expand All @@ -35,7 +34,7 @@ class Build : NukeBuild
[Parameter("Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable OCTOVERSION_CurrentBranch.", Name = "OCTOVERSION_CurrentBranch")]
readonly string BranchName;

[OctoVersion(UpdateBuildNumber = true, BranchMember = nameof(BranchName), AutoDetectBranchMember = nameof(AutoDetectBranch), Framework = "net8.0")]
[OctoVersion(UpdateBuildNumber = true, BranchMember = nameof(BranchName), AutoDetectBranchMember = nameof(AutoDetectBranch), Framework = "net10.0")]
readonly OctoVersionInfo OctoVersionInfo;

[Parameter("The test Filter passed to dotnet test e.g. TestCategory=Async")]
Expand Down Expand Up @@ -79,9 +78,9 @@ class Build : NukeBuild

Target Compile => _ => CompileDefinition(_, null);

Target CompileNet48 => _ => CompileDefinition(_, "net48");
Target CompileNetFramework => _ => CompileDefinition(_, "net48");

Target CompileNet80 => _ => CompileDefinition(_, "net8.0");
Target CompileDotNet => _ => CompileDefinition(_, "net10.0");

ITargetDefinition CompileDefinition(ITargetDefinition targetDefinition, [CanBeNull] string framework)
{
Expand All @@ -106,10 +105,10 @@ ITargetDefinition CompileDefinition(ITargetDefinition targetDefinition, [CanBeNu
Target TestLinux => _ => TestDefinition(_, Compile, null, runDotMemoryTests: false);

[PublicAPI]
Target TestWindowsNet48 => _ => TestDefinition(_, CompileNet48, "net48", runDotMemoryTests: true);
Target TestWindowsNetFramework => _ => TestDefinition(_, CompileNetFramework, "net48", runDotMemoryTests: true);

[PublicAPI]
Target TestWindowsNet80 => _ => TestDefinition(_, CompileNet80, "net8.0", runDotMemoryTests: false);
Target TestWindowsDotNet => _ => TestDefinition(_, CompileDotNet, "net10.0", runDotMemoryTests: false);

ITargetDefinition TestDefinition(ITargetDefinition targetDefinition, Target dependsOn, [CanBeNull] string framework, bool runDotMemoryTests)
{
Expand Down Expand Up @@ -166,7 +165,7 @@ ITargetDefinition TestDefinition(ITargetDefinition targetDefinition, Target depe
{
LocalPackagesDirectory.CreateDirectory();
ArtifactsDirectory.GlobFiles("*.nupkg")
.ForEach(package => CopyFileToDirectory(package, LocalPackagesDirectory, FileExistsPolicy.Overwrite));
.ForEach(package => package.CopyToDirectory(LocalPackagesDirectory, ExistsPolicy.FileOverwrite));
});

[PublicAPI]
Expand Down
8 changes: 5 additions & 3 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand All @@ -11,8 +11,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="8.0.0" />
<PackageDownload Include="Octopus.OctoVersion.Tool" Version="[0.3.400]" />
<PackageReference Include="Nuke.Common" Version="10.1.0" />
<PackageReference Include="NuGet.Packaging" Version="6.14.3" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.12" />
<PackageDownload Include="Octopus.OctoVersion.Tool" Version="[1.1.79]" />
<PackageReference Include="JetBrains.dotMemoryUnit" Version="3.2.20220510" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.303",
"version": "10.0.401",
"rollForward": "latestFeature"
}
}
10 changes: 5 additions & 5 deletions source/Halibut.TestProxy/Halibut.TestProxy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
</PropertyGroup>

<PropertyGroup Condition="!$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>net48;net8.0</TargetFrameworks>
<TargetFrameworks>net48;net10.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="System.IO.Pipelines" Version="6.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.12" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.12" />
<PackageReference Include="System.IO.Pipelines" Version="10.0.12" Condition=" '$(TargetFramework)' == 'net48' " />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net48' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<PropertyGroup Condition="!$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>net48;net8.0</TargetFrameworks>
<TargetFrameworks>net48;net10.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Halibut.Tests\Support\TcpPortHelper.cs" Link="TcpPortHelper.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public static X509Certificate2 GetClientCertificate()
{
var octopusCertPath = GetSetting("octopuscertpath");
//Console.WriteLine($"Using octopus cert path: {octopusCertPath}");
#pragma warning disable SYSLIB0057 // obsolete ctor; kept for identical behaviour on net48 and net10
var clientCert = new X509Certificate2(octopusCertPath);
#pragma warning restore SYSLIB0057
//Console.WriteLine("Octopus/Client cert details " + clientCert);

return clientCert;
Expand All @@ -94,7 +96,9 @@ public static X509Certificate2 GetServiceCertificate()
{
var tentacleCertPath = GetSetting("tentaclecertpath");
//Console.WriteLine($"Using tentacle cert path: {tentacleCertPath}");
#pragma warning disable SYSLIB0057 // obsolete ctor; kept for identical behaviour on net48 and net10
var serviceCert = new X509Certificate2(tentacleCertPath);
#pragma warning restore SYSLIB0057
//Console.WriteLine("Tentacle/service cert details " + serviceCert);

return serviceCert;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>

<PropertyGroup Condition="!$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>net48;net8.0</TargetFrameworks>
<TargetFrameworks>net48;net10.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>

<PropertyGroup Condition="!$([MSBuild]::IsOSUnixLike())">
<TargetFrameworks>net48;net8.0</TargetFrameworks>
<TargetFrameworks>net48;net10.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading