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
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
with:
fetch-depth: 0 # all

- name: Setup .NET 8
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'

- name: Test .NET 8
- name: Test .NET 10
run: ./build.ps1 -target Test

- name: Windows unit test report
Expand All @@ -61,10 +61,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET 8
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x

- name: Append OCTOVERSION_CurrentBranch with -nightly-<timestamp> (for scheduled)
if: github.event_name == 'schedule'
Expand Down
130 changes: 69 additions & 61 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,49 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Build Schema",
"$ref": "#/definitions/build",
"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": [
"CalculateVersion",
"Clean",
"Compile",
"Pack",
"Restore",
"Test"
]
},
"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"
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
Expand All @@ -19,34 +53,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 @@ -70,47 +83,42 @@
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"CalculateVersion",
"Clean",
"Compile",
"Pack",
"Restore",
"Test"
]
"$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": [
"CalculateVersion",
"Clean",
"Compile",
"Pack",
"Restore",
"Test"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
"$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"
},
"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"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
}
}
]
}
3 changes: 1 addition & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Nuke.Common.Tools.OctoVersion;
using Nuke.Common.Utilities.Collections;
using Serilog;
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.Tools.DotNet.DotNetTasks;

[ShutdownDotNetAfterServerBuild]
Expand All @@ -26,7 +25,7 @@ class Build : NukeBuild
[Parameter("Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable " + CiBranchNameEnvVariable + ".", Name = CiBranchNameEnvVariable)]
string BranchName { get; set; }

[OctoVersion(BranchMember = nameof(BranchName), AutoDetectBranchMember = nameof(AutoDetectBranch))]
[OctoVersion(BranchMember = nameof(BranchName), AutoDetectBranchMember = nameof(AutoDetectBranch), Framework = "net10.0")]
public OctoVersionInfo OctoVersionInfo;

AbsolutePath SourceDirectory => RootDirectory / "source";
Expand Down
8 changes: 3 additions & 5 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<!-- NET8: Remove this when Nuke releases a new version which sets it for us -->
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="7.0.6" />
<PackageReference Include="Nuke.Common" Version="10.1.0" />
</ItemGroup>

<ItemGroup>
<PackageDownload Include="Octopus.OctoVersion.Tool" Version="[0.3.295]" />
<PackageDownload Include="Octopus.OctoVersion.Tool" Version="[1.1.79]" />
</ItemGroup>
</Project>
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.100",
"version": "10.0.100",
"rollForward": "latestFeature"
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Assent" Version="2.3.2" />
<PackageReference Include="Fastenshtein" Version="1.0.0.8" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="nunit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Assent" Version="3.0.1" />
<PackageReference Include="Fastenshtein" Version="1.0.12" />
<PackageReference Include="FluentAssertions" Version="7.2.2" />
<PackageReference Include="nunit" Version="4.6.1" />
<PackageReference Include="NUnit3TestAdapter" Version="6.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.10.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading