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
6 changes: 6 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"commands": [
"nuke"
]
},
"coveralls.net": {
"version": "4.0.1",
"commands": [
"csmacnz.Coveralls"
]
}
}
}
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
with:
name: Demo.Engine.zip
path: artifacts/Demo.Engine.zip
- name: 'Publish: Demo.Engine.win10-x64.zip'
- name: 'Publish: Demo.Engine.win-x64.zip'
uses: actions/upload-artifact@v3
with:
name: Demo.Engine.win10-x64.zip
path: artifacts/Demo.Engine.win10-x64.zip
name: Demo.Engine.win-x64.zip
path: artifacts/Demo.Engine.win-x64.zip
1 change: 1 addition & 0 deletions DemoEngine.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution items", "solution
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
.config\dotnet-tools.json = .config\dotnet-tools.json
global.json = global.json
EndProjectSection
EndProject
Expand Down
21 changes: 13 additions & 8 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ namespace BuildScript;
[GitHubActions(
"CI",
GitHubActionsImage.WindowsLatest,
On = new[]
{
On =
[
GitHubActionsTrigger.Push
},
],
InvokedTargets = new[]
{
nameof(Clean),
Expand Down Expand Up @@ -79,7 +79,7 @@ internal partial class Build : NukeBuild
public readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;

[Parameter("Self contained application rids")]
public readonly string[] RIDs = Array.Empty<string>();
public readonly string[] RIDs = [];

[Parameter("Coveralls token")]
public readonly string? CoverallsToken = null;
Expand Down Expand Up @@ -125,7 +125,7 @@ protected override void OnBuildInitialized()
.SetNoFetch(false)
.SetNoCache(true)
.SetVerbosity(GitVersionVerbosity.debug)
.SetFramework("net7.0")
.SetFramework("net8.0")
.DisableProcessLogOutput())
.Result;
}
Expand All @@ -152,10 +152,14 @@ protected override void OnBuildInitialized()
.Executes(() => DotNetRestore(_ => _
.SetProjectFile(Solution)));

#pragma warning disable CA1822 // Mark members as static

public Target VerifyCodeFormat => _ => _
.Executes(() => DotNet(
@"format -v n --verify-no-changes --exclude .\src\Demo.Engine\Program.cs"));

#pragma warning restore CA1822 // Mark members as static

public Target Compile => _ => _
.DependsOn(Restore, VerifyCodeFormat)
.Executes(() => DotNetBuild(_ => _
Expand Down Expand Up @@ -221,15 +225,15 @@ protected override void OnBuildInitialized()
.After(Test)
.Produces(
ArtifactsDirectory / "Demo.Engine.zip",
ArtifactsDirectory / "Demo.Engine.win10-x64.zip")
ArtifactsDirectory / "Demo.Engine.win-x64.zip")
.Executes(() =>
{
//A runtime dependant version is also currently generated by default and exposed to CI artifacts
PublishApp("Demo.Engine");

//We generate a self contained, "one file", trimmed version for Windows 10 x64 by default
//We generate a self contained, "one file", trimmed version for Windows x64 by default
//Any other can be generated as well, but aren't currently supported so aren't exposed to CI artifacts
foreach (var rid in RIDs.Concat("win10-x64"))
foreach (var rid in RIDs.Concat("win-x64"))
{
PublishApp("Demo.Engine", rid);
}
Expand Down Expand Up @@ -258,6 +262,7 @@ protected override void OnBuildInitialized()
.ToArray()[3..]
.Select(o => o.Text))
.Trim();
Environment.SetEnvironmentVariable("DOTNET_ROLL_FORWARD", "LatestMajor");

_ = CoverallsNet(toolSettings => toolSettings
.SetDryRun(Debugger.IsAttached)
Expand Down
4 changes: 3 additions & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<RootNamespace></RootNamespace>
<IsPackable>False</IsPackable>
Expand All @@ -11,6 +11,8 @@
<NukeScriptDirectory>..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<Nullable>enable</Nullable>
<!--Workaround for https://github.com/nuke-build/nuke/issues/1282-->
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>

<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": "7.0.100",
"version": "8.0.100",
"rollForward": "latestFeature"
}
}
8 changes: 4 additions & 4 deletions src/Demo.Engine.Core/Demo.Engine.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>x64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -15,9 +15,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MediatR" Version="12.1.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Vortice.Mathematics" Version="1.7.2" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>x64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<Platforms>x64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
2 changes: 1 addition & 1 deletion src/Demo.Engine/Demo.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<Platforms>x64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
6 changes: 3 additions & 3 deletions src/Demo.Tools.Common/Demo.Tools.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>x64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -15,8 +15,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions test/Demo.Engine.Core.UTs/Demo.Engine.Core.UTs.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Platforms>x64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -21,7 +21,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.16">
<PrivateAssets>all</PrivateAssets>
Expand Down
4 changes: 2 additions & 2 deletions test/Demo.Tools.Common.UTs/Demo.Tools.Common.UTs.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Platforms>x64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -21,7 +21,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
Expand Down