diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 2fc8cae9..fdabac37 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -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" diff --git a/Build/Nuke/Build.AzurePipelinesAttribute.cs b/Build/Nuke/Build.AzurePipelinesAttribute.cs index ff3c633a..48c0c86d 100644 --- a/Build/Nuke/Build.AzurePipelinesAttribute.cs +++ b/Build/Nuke/Build.AzurePipelinesAttribute.cs @@ -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 { @@ -26,8 +27,7 @@ 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: @@ -35,7 +35,7 @@ protected override AzurePipelinesStage GetStage(AzurePipelinesImage image, IRead 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: @@ -47,9 +47,9 @@ protected override AzurePipelinesStage GetStage(AzurePipelinesImage image, IRead return base.GetStage(image, filterRelevantTargets); } - protected override AzurePipelinesJob GetJob(ExecutableTarget executableTarget, LookupTable jobs, IReadOnlyCollection relevantTargets) + protected override AzurePipelinesJob GetJob(ExecutableTarget executableTarget, LookupTable jobs, IReadOnlyCollection relevantTargets, AzurePipelinesImage image) { - var job = base.GetJob(executableTarget, jobs, relevantTargets); + var job = base.GetJob(executableTarget, jobs, relevantTargets, image); var dictionary = new Dictionary { {nameof(Compile), "⚙️"}, @@ -66,5 +66,6 @@ protected override AzurePipelinesJob GetJob(ExecutableTarget executableTarget, L : $"{prefix}{job.DisplayName} 🧩"; return job; } + } } \ No newline at end of file diff --git a/Build/Nuke/Build.cs b/Build/Nuke/Build.cs index 9cdacec3..a225b5a4 100644 --- a/Build/Nuke/Build.cs +++ b/Build/Nuke/Build.cs @@ -23,7 +23,7 @@ GitHubActionsImage.WindowsLatest, AutoGenerate = false, On = new[] { GitHubActionsTrigger.Push }, - ImportGitHubTokenAs = nameof(GitHubToken), + EnableGitHubContext = true, InvokedTargets = new[] { nameof(Test), nameof(Pack) })] [GitHubActions( "continuousCore", @@ -31,7 +31,7 @@ GitHubActionsImage.MacOsLatest, AutoGenerate = false, On = new[] { GitHubActionsTrigger.Push }, - ImportGitHubTokenAs = nameof(GitHubToken), + EnableGitHubContext = true, InvokedTargets = new[] { nameof(TestCoreOnly) })] [AzurePipelines( suffix: null, @@ -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"; @@ -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 = @@ -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 @@ -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 => diff --git a/Build/Nuke/NukeBuild.csproj b/Build/Nuke/NukeBuild.csproj index 873db87f..06d8f47b 100644 --- a/Build/Nuke/NukeBuild.csproj +++ b/Build/Nuke/NukeBuild.csproj @@ -11,7 +11,7 @@ - +