Skip to content

Commit 15a3c34

Browse files
authored
Use NET 10 SDK and upgrade to NUKE 10 (#332)
1 parent bdbd1cb commit 15a3c34

File tree

11 files changed

+165
-168
lines changed

11 files changed

+165
-168
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,20 @@ jobs:
2020
build-windows:
2121
runs-on: windows-latest
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/setup-dotnet@v5
24+
with:
25+
dotnet-version: 10.0
26+
- uses: actions/checkout@v5
2427
- name: Run './build.cmd ci'
2528
run: ./build.cmd ci
2629

2730
build-linux:
2831
runs-on: ubuntu-latest
2932
steps:
30-
- uses: actions/checkout@v4
33+
- uses: actions/setup-dotnet@v5
34+
with:
35+
dotnet-version: 10.0
36+
- uses: actions/checkout@v5
3137
- name: Run './build.cmd ci'
3238
run: ./build.sh ci
3339

.github/workflows/publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ jobs:
1010
publish:
1111
runs-on: windows-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/setup-dotnet@v5
14+
with:
15+
dotnet-version: 10.0
16+
- uses: actions/checkout@v5
1417
- name: Publish
1518
run: ./build.cmd test publish
1619
env:

.nuke/build.schema.json

Lines changed: 95 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,58 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"$ref": "#/definitions/build",
4-
"title": "Build Schema",
53
"definitions": {
6-
"build": {
7-
"type": "object",
4+
"Host": {
5+
"type": "string",
6+
"enum": [
7+
"AppVeyor",
8+
"AzurePipelines",
9+
"Bamboo",
10+
"Bitbucket",
11+
"Bitrise",
12+
"GitHubActions",
13+
"GitLab",
14+
"Jenkins",
15+
"Rider",
16+
"SpaceAutomation",
17+
"TeamCity",
18+
"Terminal",
19+
"TravisCI",
20+
"VisualStudio",
21+
"VSCode"
22+
]
23+
},
24+
"ExecutableTarget": {
25+
"type": "string",
26+
"enum": [
27+
"Antlr",
28+
"Ci",
29+
"Clean",
30+
"Compile",
31+
"CompileExamples",
32+
"CompileSolution",
33+
"Docs",
34+
"DocsReference",
35+
"DocsSdk",
36+
"Pack",
37+
"PackBinaries",
38+
"Publish",
39+
"Restore",
40+
"Test",
41+
"Website"
42+
]
43+
},
44+
"Verbosity": {
45+
"type": "string",
46+
"description": "",
47+
"enum": [
48+
"Verbose",
49+
"Normal",
50+
"Minimal",
51+
"Quiet"
52+
]
53+
},
54+
"NukeBuild": {
855
"properties": {
9-
"BuildEms": {
10-
"type": "boolean",
11-
"description": "Build EMS"
12-
},
13-
"Configuration": {
14-
"type": "string",
15-
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
16-
"enum": [
17-
"Debug",
18-
"Release"
19-
]
20-
},
2156
"Continue": {
2257
"type": "boolean",
2358
"description": "Indicates to continue a previously failed build attempt"
@@ -27,37 +62,13 @@
2762
"description": "Shows the help text for this build assembly"
2863
},
2964
"Host": {
30-
"type": "string",
3165
"description": "Host for execution. Default is 'automatic'",
32-
"enum": [
33-
"AppVeyor",
34-
"AzurePipelines",
35-
"Bamboo",
36-
"Bitbucket",
37-
"Bitrise",
38-
"GitHubActions",
39-
"GitLab",
40-
"Jenkins",
41-
"Rider",
42-
"SpaceAutomation",
43-
"TeamCity",
44-
"Terminal",
45-
"TravisCI",
46-
"VisualStudio",
47-
"VSCode"
48-
]
66+
"$ref": "#/definitions/Host"
4967
},
5068
"NoLogo": {
5169
"type": "boolean",
5270
"description": "Disables displaying the NUKE logo"
5371
},
54-
"NuGetApiKey": {
55-
"type": "string",
56-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
57-
},
58-
"NuGetSource": {
59-
"type": "string"
60-
},
6172
"Partition": {
6273
"type": "string",
6374
"description": "Partition to use on CI"
@@ -73,10 +84,6 @@
7384
"type": "string"
7485
}
7586
},
76-
"ProjectVersion": {
77-
"type": "string",
78-
"description": "Version"
79-
},
8087
"Root": {
8188
"type": "string",
8289
"description": "Root directory during build execution"
@@ -85,54 +92,53 @@
8592
"type": "array",
8693
"description": "List of targets to be skipped. Empty list skips all dependencies",
8794
"items": {
88-
"type": "string",
89-
"enum": [
90-
"Antlr",
91-
"Ci",
92-
"Clean",
93-
"Compile",
94-
"CompileExamples",
95-
"CompileSolution",
96-
"Docs",
97-
"DocsReference",
98-
"DocsSdk",
99-
"Pack",
100-
"PackBinaries",
101-
"Publish",
102-
"Restore",
103-
"Test",
104-
"Website"
105-
]
95+
"$ref": "#/definitions/ExecutableTarget"
10696
}
10797
},
108-
"Solution": {
109-
"type": "string",
110-
"description": "Path to a solution file that is automatically loaded"
111-
},
11298
"Target": {
11399
"type": "array",
114100
"description": "List of targets to be invoked. Default is '{default_target}'",
115101
"items": {
116-
"type": "string",
117-
"enum": [
118-
"Antlr",
119-
"Ci",
120-
"Clean",
121-
"Compile",
122-
"CompileExamples",
123-
"CompileSolution",
124-
"Docs",
125-
"DocsReference",
126-
"DocsSdk",
127-
"Pack",
128-
"PackBinaries",
129-
"Publish",
130-
"Restore",
131-
"Test",
132-
"Website"
133-
]
102+
"$ref": "#/definitions/ExecutableTarget"
134103
}
135104
},
105+
"Verbosity": {
106+
"description": "Logging verbosity during build execution. Default is 'Normal'",
107+
"$ref": "#/definitions/Verbosity"
108+
}
109+
}
110+
}
111+
},
112+
"allOf": [
113+
{
114+
"properties": {
115+
"BuildEms": {
116+
"type": "boolean",
117+
"description": "Build EMS"
118+
},
119+
"Configuration": {
120+
"type": "string",
121+
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
122+
"enum": [
123+
"Debug",
124+
"Release"
125+
]
126+
},
127+
"NuGetApiKey": {
128+
"type": "string",
129+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
130+
},
131+
"NuGetSource": {
132+
"type": "string"
133+
},
134+
"ProjectVersion": {
135+
"type": "string",
136+
"description": "Version"
137+
},
138+
"Solution": {
139+
"type": "string",
140+
"description": "Path to a solution file that is automatically loaded"
141+
},
136142
"TestFull": {
137143
"type": "boolean"
138144
},
@@ -147,18 +153,11 @@
147153
},
148154
"TestIntegrationNms": {
149155
"type": "boolean"
150-
},
151-
"Verbosity": {
152-
"type": "string",
153-
"description": "Logging verbosity during build execution. Default is 'Normal'",
154-
"enum": [
155-
"Minimal",
156-
"Normal",
157-
"Quiet",
158-
"Verbose"
159-
]
160156
}
161157
}
158+
},
159+
{
160+
"$ref": "#/definitions/NukeBuild"
162161
}
163-
}
162+
]
164163
}

Directory.Packages.props

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
2626
<PackageVersion Include="Microsoft.Win32.Registry" Version="4.7.0" />
2727
<PackageVersion Include="NHibernate" Version="5.5.2" />
28-
<PackageVersion Include="Nuke.Common" Version="8.0.0" />
28+
<PackageVersion Include="Nuke.Common" Version="10.0.0" />
2929
<PackageVersion Include="NUnit" Version="3.14.0" />
3030
<PackageVersion Include="NUnit3TestAdapter" Version="5.0.0" />
3131
<PackageVersion Include="NVelocity" Version="1.2.0" />
@@ -35,8 +35,6 @@
3535
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
3636
<PackageVersion Include="System.Data.SQLite.Core" Version="1.0.119" />
3737
<PackageVersion Include="System.Data.SqlClient" Version="4.8.6" />
38-
<PackageVersion Include="System.Reflection" Version="4.3.0" />
39-
<PackageVersion Include="System.Reflection.Primitives" Version="4.3.0" />
4038
<PackageVersion Include="System.Reflection.Emit" Version="4.7.0" />
4139
<PackageVersion Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
4240
<PackageVersion Include="System.Resources.Extensions" Version="8.0.0" />

build-support/nuke-build/Build.Documentation.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public partial class Build
2626
"""
2727
).AssertWaitForExit();
2828

29-
FileSystemTasks.CopyDirectoryRecursively(ReferenceDocumentationPath / "src" / "styles", targetDir / "html" / "styles", DirectoryExistsPolicy.Merge);
30-
FileSystemTasks.CopyDirectoryRecursively(ReferenceDocumentationPath / "src" / "images", targetDir / "html" / "images", DirectoryExistsPolicy.Merge, excludeFile: file => file.Extension != ".gif" && file.Extension != ".svg" && file.Extension != ".jpg" && file.Extension != ".png");
31-
FileSystemTasks.CopyDirectoryRecursively(ReferenceDocumentationPath / "lib" / "docbook-xsl-snapshot" / "images", targetDir / "html" / "images", DirectoryExistsPolicy.Merge);
29+
(ReferenceDocumentationPath / "src" / "styles").CopyToDirectory(targetDir / "html" / "styles", ExistsPolicy.MergeAndOverwrite);
30+
(ReferenceDocumentationPath / "src" / "images").CopyToDirectory(targetDir / "html" / "images", ExistsPolicy.MergeAndOverwrite, excludeFile: file => file.Extension != ".gif" && file.Extension != ".svg" && file.Extension != ".jpg" && file.Extension != ".png");
31+
(ReferenceDocumentationPath / "lib" / "docbook-xsl-snapshot" / "images").CopyToDirectory(targetDir / "html" / "images", ExistsPolicy.MergeAndOverwrite);
3232
});
3333

3434
Target DocsSdk => _ => _
@@ -45,6 +45,6 @@ public partial class Build
4545
ProcessTasks.StartProcess("yarn", arguments: "build", workingDirectory: webSiteDir).AssertWaitForExit();
4646

4747
// copy reference docs
48-
FileSystemTasks.CopyDirectoryRecursively(ReferenceDocumentationPath / "target" / "html", webSiteDir / "public" / "doc-latest" / "reference" / "html", DirectoryExistsPolicy.Merge);
48+
(ReferenceDocumentationPath / "target" / "html").CopyToDirectory(webSiteDir / "public" / "doc-latest" / "reference" / "html", ExistsPolicy.MergeAndOverwrite);
4949
});
5050
}

build-support/nuke-build/Build.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
using Nuke.Common.Tools.MSBuild;
1515
using Nuke.Common.Utilities.Collections;
1616
using Serilog;
17-
using static Nuke.Common.IO.FileSystemTasks;
17+
1818
using static Nuke.Common.Tooling.ProcessTasks;
1919
using static Nuke.Common.Tools.DotNet.DotNetTasks;
2020
using static Nuke.Common.Tools.MSBuild.MSBuildTasks;
@@ -184,7 +184,7 @@ protected override void OnBuildInitialized()
184184

185185
foreach (var file in BuildDirectory.GlobFiles(patterns))
186186
{
187-
CopyFileToDirectory(file, binDirectory / "net", FileExistsPolicy.OverwriteIfNewer);
187+
file.CopyToDirectory(binDirectory / "net", ExistsPolicy.FileOverwriteIfNewer);
188188
}
189189
});
190190

build-support/nuke-build/_build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<RootNamespace></RootNamespace>
77
<NoWarn>CS0649;CS0169</NoWarn>
88
<NukeRootDirectory>..\..</NukeRootDirectory>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.100",
3+
"version": "10.0.100",
44
"rollForward": "latestMinor"
55
}
66
}

0 commit comments

Comments
 (0)