-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for .NET 7 #1617
Support for .NET 7 #1617
Changes from 5 commits
da0a524
ab03214
d3ee496
775c674
9cb09ee
744460a
22753c2
b0c6659
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ jobs: | |
with: | ||
dotnet-version: | | ||
6.0.x | ||
7.0.x | ||
- run: ./build.cmd Workflow --containers ${{ matrix.containers }} | ||
- name: Upload logs | ||
uses: actions/[email protected] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,10 +20,10 @@ jobs: | |
- name: check out code | ||
uses: actions/[email protected] | ||
|
||
- name: Setup .NET 6.0 | ||
- name: Setup .NET 7.0 | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 6.0.x | ||
dotnet-version: 7.0.x | ||
|
||
- name: Install format tool | ||
run: dotnet tool install -g dotnet-format | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ jobs: | |
with: | ||
dotnet-version: | | ||
6.0.x | ||
7.0.x | ||
- run: ./build.cmd | ||
- name: Upload binaries | ||
uses: actions/[email protected] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ jobs: | |
with: | ||
dotnet-version: | | ||
6.0.x | ||
7.0.x | ||
- run: ./build.cmd BuildTracer ManagedTests --containers ${{ matrix.containers }} --test-project "${{ github.event.inputs.testProject }}" --test-name '"${{ github.event.inputs.testName }}"' --test-count ${{ github.event.inputs.count }} | ||
- name: Upload logs | ||
uses: actions/[email protected] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
using Nuke.Common.Tools.Npm; | ||
using Nuke.Common.Tools.NuGet; | ||
using Nuke.Common.Utilities.Collections; | ||
using static DotNetMSBuildTasks; | ||
using static Nuke.Common.EnvironmentInfo; | ||
using static Nuke.Common.IO.FileSystemTasks; | ||
using static Nuke.Common.Tools.DotNet.DotNetTasks; | ||
|
@@ -52,7 +51,10 @@ partial class Build | |
TargetFramework.NET6_0 | ||
}; | ||
|
||
private static readonly IEnumerable<TargetFramework> TestFrameworks = TargetFrameworks; | ||
private static readonly IEnumerable<TargetFramework> TestFrameworks = TargetFrameworks | ||
.Concat(new[] { | ||
TargetFramework.NET7_0 | ||
}); | ||
|
||
Target CreateRequiredDirectories => _ => _ | ||
.Unlisted() | ||
|
@@ -129,7 +131,7 @@ partial class Build | |
|
||
DotNetMSBuild(x => x | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DotNetMSBuild is build in the Nuke itself, so I was able to remove our custom class. |
||
.SetTargetPath(MsBuildProject) | ||
.SetTargetPlatform(Platform) | ||
.SetPlatform(Platform) | ||
.SetConfiguration(BuildConfiguration) | ||
.DisableRestore() | ||
.SetTargets("BuildCsharpTest")); | ||
|
@@ -333,22 +335,21 @@ partial class Build | |
return; | ||
} | ||
|
||
IEnumerable<TargetFramework> frameworks = IsWin ? TestFrameworks : TestFrameworks.ExceptNetFramework(); | ||
var frameworks = IsWin ? TestFrameworks : TestFrameworks.ExceptNetFramework(); | ||
|
||
for (int i = 0; i < TestCount; i++) | ||
{ | ||
DotNetTest(config => config | ||
DotNetMSBuild(config => config | ||
.SetConfiguration(BuildConfiguration) | ||
.SetTargetPlatform(Platform) | ||
.SetPlatform(Platform) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no way to pass Platform (x64/x86) through the dotnet tests to dotnet msbuild executed under the hood. This property is important, because .NET 7 SDK changed the output path structure based on this. Previously it was working only by accident. |
||
.SetFilter(AndFilter(TestNameFilter(), ContainersFilter())) | ||
.SetBlameHangTimeout("5m") | ||
.EnableTrxLogOutput(GetResultsDirectory(project)) | ||
.SetProjectFile(project) | ||
.EnableNoRestore() | ||
.EnableNoBuild() | ||
.CombineWith(frameworks, (s, fx) => s | ||
.SetFramework(fx) | ||
)); | ||
.SetTargetPath(project) | ||
.DisableRestore() | ||
.SetTargets("VSTest") | ||
Kielek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.SetProperty("VSTestNoBuild", true) | ||
); | ||
} | ||
}); | ||
|
||
|
@@ -488,6 +489,7 @@ string GetFolderRuntimeName(JsonDocument jsonDocument) | |
var folderRuntimeName = runtimeName switch | ||
{ | ||
".NETCoreApp,Version=v6.0" => "net6.0", | ||
".NETCoreApp,Version=v7.0" => "net7.0", | ||
_ => throw new ArgumentOutOfRangeException(nameof(runtimeName), runtimeName, | ||
"This value is not supported. You have probably introduced new .NET version to AutoInstrumentation") | ||
}; | ||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan was only to add tests for .NET 7, but additional dependencies/store requires separate folder structure for each supported .NET version.