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
4 changes: 0 additions & 4 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"GitHubToken": {
"type": "string",
"description": "GitHub Token"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
Expand Down
11 changes: 6 additions & 5 deletions Build/Nuke/Build.AzurePipelinesAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Nuke.Common.CI.AzurePipelines.Configuration;
using Nuke.Common.Execution;
using Nuke.Common.Tooling;
using Nuke.Common.Utilities.Collections;

partial class Build
{
Expand All @@ -26,16 +27,15 @@ protected override AzurePipelinesStage GetStage(AzurePipelinesImage image, IRead
case AzurePipelinesImage.WindowsLatest:
case AzurePipelinesImage.Windows2019:
case AzurePipelinesImage.Vs2017Win2016:
case AzurePipelinesImage.Vs2015Win2012R2:
case AzurePipelinesImage.Win1803:
case AzurePipelinesImage.Windows2022:
targetToExcludes = new []{ nameof(TestCoreOnly), nameof(CompileCoreOnly), nameof(PackCoreOnly)};
break;
case AzurePipelinesImage.Ubuntu1604:
case AzurePipelinesImage.Ubuntu1804:
case AzurePipelinesImage.UbuntuLatest:
case AzurePipelinesImage.MacOsLatest:
case AzurePipelinesImage.MacOs1014:
case AzurePipelinesImage.MacOs1013:
case AzurePipelinesImage.MacOs11:
targetToExcludes = new[] { nameof(Test), nameof(Compile), nameof(Pack), nameof(PackCoreOnly) };
break;
default:
Expand All @@ -47,9 +47,9 @@ protected override AzurePipelinesStage GetStage(AzurePipelinesImage image, IRead
return base.GetStage(image, filterRelevantTargets);
}

protected override AzurePipelinesJob GetJob(ExecutableTarget executableTarget, LookupTable<ExecutableTarget, AzurePipelinesJob> jobs, IReadOnlyCollection<ExecutableTarget> relevantTargets)
protected override AzurePipelinesJob GetJob(ExecutableTarget executableTarget, LookupTable<ExecutableTarget, AzurePipelinesJob> jobs, IReadOnlyCollection<ExecutableTarget> relevantTargets, AzurePipelinesImage image)
{
var job = base.GetJob(executableTarget, jobs, relevantTargets);
var job = base.GetJob(executableTarget, jobs, relevantTargets, image);
var dictionary = new Dictionary<string, string>
{
{nameof(Compile), "⚙️"},
Expand All @@ -66,5 +66,6 @@ protected override AzurePipelinesJob GetJob(ExecutableTarget executableTarget, L
: $"{prefix}{job.DisplayName} 🧩";
return job;
}

}
}
11 changes: 5 additions & 6 deletions Build/Nuke/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
GitHubActionsImage.WindowsLatest,
AutoGenerate = false,
On = new[] { GitHubActionsTrigger.Push },
ImportGitHubTokenAs = nameof(GitHubToken),
EnableGitHubContext = true,
InvokedTargets = new[] { nameof(Test), nameof(Pack) })]
[GitHubActions(
"continuousCore",
GitHubActionsImage.UbuntuLatest,
GitHubActionsImage.MacOsLatest,
AutoGenerate = false,
On = new[] { GitHubActionsTrigger.Push },
ImportGitHubTokenAs = nameof(GitHubToken),
EnableGitHubContext = true,
InvokedTargets = new[] { nameof(TestCoreOnly) })]
[AzurePipelines(
suffix: null,
Expand Down Expand Up @@ -60,7 +60,6 @@ partial class Build : Nuke.Common.NukeBuild

[CI] readonly AzurePipelines AzurePipelines;

[Parameter("GitHub Token")] readonly string GitHubToken;

AbsolutePath SourceDirectory => RootDirectory / "src";
AbsolutePath ResultDirectory => RootDirectory / ".result";
Expand Down Expand Up @@ -90,7 +89,7 @@ partial class Build : Nuke.Common.NukeBuild
void ExecutesCompile(bool excludeNetFramework)
{

Logger.Info(excludeNetFramework ? "Exclude net framework" : "Include net framework");
Serilog.Log.Information(excludeNetFramework ? "Exclude net framework" : "Include net framework");
if (excludeNetFramework)
{
var projectWithFrameworkAndPlatform =
Expand Down Expand Up @@ -133,7 +132,7 @@ from platform in project.GetPlatforms()

void ExecutesTest(bool excludeNetFramework)
{
Logger.Info(excludeNetFramework ? "Exclude net framework" : "Include net framework");
Serilog.Log.Information(excludeNetFramework ? "Exclude net framework" : "Include net framework");

var groupTestConfigurations =
(from project in TestProjects
Expand Down Expand Up @@ -162,7 +161,7 @@ from platform in project.GetPlatformsForTests()
.SetFramework(v.framework)
.DisableNoBuild()
.SetProperty("Platform", v.platform)
.SetLogger($"trx;LogFileName={v.project.Name}-{v.framework}.trx"));
.SetLoggers($"trx;LogFileName={v.project.Name}-{v.framework}.trx"));
});

TestResultDirectory.GlobFiles("*.trx").ForEach(x =>
Expand Down
2 changes: 1 addition & 1 deletion Build/Nuke/NukeBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="5.2.1" />
<PackageReference Include="Nuke.Common" Version="6.0.1" />
<PackageDownload Include="GitVersion.Tool" Version="[5.6.8]" />
</ItemGroup>

Expand Down