Skip to content

Commit 0188051

Browse files
committed
Updated NUKE and integrated tests in CI/CD
1 parent 3eb8507 commit 0188051

File tree

8 files changed

+96
-95
lines changed

8 files changed

+96
-95
lines changed

.nuke/build.schema.json

Lines changed: 79 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,54 @@
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+
"Clean",
28+
"Compile",
29+
"Default",
30+
"Package",
31+
"PrePublish",
32+
"Publish",
33+
"PublishPackages",
34+
"PublishPreRelease",
35+
"PublishRelease",
36+
"Restore",
37+
"RunUnitTests"
38+
]
39+
},
40+
"Verbosity": {
41+
"type": "string",
42+
"description": "",
43+
"enum": [
44+
"Verbose",
45+
"Normal",
46+
"Minimal",
47+
"Quiet"
48+
]
49+
},
50+
"NukeBuild": {
851
"properties": {
9-
"CommonPropsFilePath": {
10-
"type": "string",
11-
"description": "common.props file path - to determine the configured version"
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-
},
2152
"Continue": {
2253
"type": "boolean",
2354
"description": "Indicates to continue a previously failed build attempt"
@@ -27,25 +58,8 @@
2758
"description": "Shows the help text for this build assembly"
2859
},
2960
"Host": {
30-
"type": "string",
3161
"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-
]
62+
"$ref": "#/definitions/Host"
4963
},
5064
"NoLogo": {
5165
"type": "boolean",
@@ -66,10 +80,6 @@
6680
"type": "string"
6781
}
6882
},
69-
"ReleaseNotesFilePath": {
70-
"type": "string",
71-
"description": "ReleaseNotesFilePath - To determine the lates changelog version"
72-
},
7383
"Root": {
7484
"type": "string",
7585
"description": "Root directory during build execution"
@@ -78,59 +88,50 @@
7888
"type": "array",
7989
"description": "List of targets to be skipped. Empty list skips all dependencies",
8090
"items": {
81-
"type": "string",
82-
"enum": [
83-
"Clean",
84-
"Compile",
85-
"CreatePackages",
86-
"Default",
87-
"Package",
88-
"PrePublish",
89-
"Publish",
90-
"PublishPackages",
91-
"PublishPreRelease",
92-
"PublishRelease",
93-
"Restore",
94-
"RunUnitTests"
95-
]
91+
"$ref": "#/definitions/ExecutableTarget"
9692
}
9793
},
98-
"Solution": {
99-
"type": "string",
100-
"description": "Path to a solution file that is automatically loaded"
101-
},
10294
"Target": {
10395
"type": "array",
10496
"description": "List of targets to be invoked. Default is '{default_target}'",
10597
"items": {
106-
"type": "string",
107-
"enum": [
108-
"Clean",
109-
"Compile",
110-
"CreatePackages",
111-
"Default",
112-
"Package",
113-
"PrePublish",
114-
"Publish",
115-
"PublishPackages",
116-
"PublishPreRelease",
117-
"PublishRelease",
118-
"Restore",
119-
"RunUnitTests"
120-
]
98+
"$ref": "#/definitions/ExecutableTarget"
12199
}
122100
},
123101
"Verbosity": {
124-
"type": "string",
125102
"description": "Logging verbosity during build execution. Default is 'Normal'",
103+
"$ref": "#/definitions/Verbosity"
104+
}
105+
}
106+
}
107+
},
108+
"allOf": [
109+
{
110+
"properties": {
111+
"CommonPropsFilePath": {
112+
"type": "string",
113+
"description": "common.props file path - to determine the configured version"
114+
},
115+
"Configuration": {
116+
"type": "string",
117+
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
126118
"enum": [
127-
"Minimal",
128-
"Normal",
129-
"Quiet",
130-
"Verbose"
119+
"Debug",
120+
"Release"
131121
]
122+
},
123+
"ReleaseNotesFilePath": {
124+
"type": "string",
125+
"description": "ReleaseNotesFilePath - To determine the lates changelog version"
126+
},
127+
"Solution": {
128+
"type": "string",
129+
"description": "Path to a solution file that is automatically loaded"
132130
}
133131
}
132+
},
133+
{
134+
"$ref": "#/definitions/NukeBuild"
134135
}
135-
}
136+
]
136137
}

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Added option to provide floating point value as aspect ratios with `SetAspectRatio` (#793)
1313
- Added `TitleBarOverlay` property to `BrowserWindowOptions` (#909)
1414
- Added `RoundedCorners` property to `BrowserWindowOptions`
15+
- Added .NET 10 as an explicit target
1516

1617
# 0.0.18
1718

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017-2024 Gregor Biswanger, Robert Mühsig
3+
Copyright (c) 2017-2025 Gregor Biswanger, Robert Mühsig, Florian Rappl
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

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.305",
3+
"version": "10.0.100",
44
"rollForward": "feature",
55
"allowPrerelease": false
66
}

nuke/Build.cs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Nuke.Common.CI.GitHubActions;
44
using Nuke.Common.IO;
55
using Nuke.Common.ProjectModel;
6+
using Nuke.Common.Tooling;
67
using Nuke.Common.Tools.DotNet;
78
using Nuke.Common.Tools.GitHub;
89
using Nuke.Common.Tools.NuGet;
@@ -15,7 +16,6 @@
1516
using System.IO;
1617
using System.Linq;
1718

18-
using static Nuke.Common.IO.FileSystemTasks;
1919
using static Nuke.Common.IO.PathConstruction;
2020
using static Nuke.Common.Tools.DotNet.DotNetTasks;
2121
// ReSharper disable ArrangeThisQualifier
@@ -116,15 +116,15 @@ protected override void OnBuildInitialized()
116116
Target Restore => _ => _
117117
.Executes(() =>
118118
{
119-
DotNetRestore(s => s.SetProjectFile(Solution.Path));
119+
DotNetRestore(s => s.SetProjectFile(Solution));
120120
});
121121

122122
Target Compile => _ => _
123123
.DependsOn(Restore)
124124
.Executes(() =>
125125
{
126126
DotNetBuild(s => s
127-
.SetProjectFile(Solution.Path)
127+
.SetProjectFile(Solution)
128128
.SetConfiguration(Configuration)
129129
.SetProperty("GeneratePackageOnBuild", "True")
130130
.SetProperty("VersionPostFix", VersionPostFix ?? string.Empty));
@@ -134,18 +134,17 @@ protected override void OnBuildInitialized()
134134
.DependsOn(Compile)
135135
.Executes(() =>
136136
{
137-
// There aren't any yet
138-
});
137+
var TestProject = SourceDirectory / "ElectronNET.IntegrationTests" / "ElectronNET.IntegrationTests.csproj";
139138

140-
Target CreatePackages => _ => _
141-
.DependsOn(Compile)
142-
.Executes(() =>
143-
{
144-
// Packages are created on build
139+
DotNetTest(s => s
140+
.SetProjectFile(TestProject)
141+
.SetConfiguration(Configuration)
142+
.When(_ => GitHubActions.Instance is not null, x => x.SetLoggers("GitHubActions"))
143+
);
145144
});
146145

147146
Target PublishPackages => _ => _
148-
.DependsOn(CreatePackages)
147+
.DependsOn(Compile)
149148
.DependsOn(RunUnitTests)
150149
.Executes(() =>
151150
{
@@ -240,7 +239,7 @@ protected override void OnBuildInitialized()
240239

241240
Target Package => _ => _
242241
.DependsOn(RunUnitTests)
243-
.DependsOn(CreatePackages);
242+
.DependsOn(Compile);
244243

245244
Target Default => _ => _
246245
.DependsOn(Package);

nuke/_build.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Nuke.Common" Version="8.0.0" />
14+
<PackageReference Include="Nuke.Common" Version="9.0.4" />
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageDownload Include="NuGet.CommandLine" Version="[6.3.1]" />
18+
<PackageDownload Include="NuGet.CommandLine" Version="[6.12.2]" />
1919
</ItemGroup>
2020

2121
</Project>
0 Bytes
Binary file not shown.

src/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>0.1.0.0</Version>
3+
<Version>0.1.0</Version>
44
<PackageNamePrefix>ElectronNET.Core</PackageNamePrefix>
55
<Authors>Gregor Biswanger, Florian Rappl, softworkz</Authors>
66
<Product>Electron.NET</Product>

0 commit comments

Comments
 (0)