From 96efc2a855f4ca25fa1d6d8537c6968f5e917daa Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Tue, 11 Oct 2022 16:35:00 -0500 Subject: [PATCH 1/5] [release/6.0.1xx] Enable online and offline source-build tarball build in all PRs (#14711) * Enable online and offline source-build tarball build in all PRs (#14620) * Fix source-build CI to not run tarball build when tarball creation fails (#14678) * Fix source-build CI to not run tarball build when tarball creation failed * Bad fix * Revert test patch --- .vsts-ci.yml | 8 ++++---- .../templates/job/source-build-create-tarball.yml | 12 ------------ .../templates/job/source-build-run-tarball-build.yml | 7 +------ 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index f63ac7c00..7eca85c35 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -375,10 +375,10 @@ stages: - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml - parameters: - dependsOn: Source_Build_Create_Tarball - condition: eq(dependencies.Source_Build_Create_Tarball.outputs['Tarball_Build_Check._includeTarballBuild'], 'true') + - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: + - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml + parameters: + dependsOn: Source_Build_Create_Tarball # https://github.com/dotnet/core-sdk/issues/248 # - template: /eng/build.yml diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml index db3657cd9..cffdf6bdb 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml @@ -74,15 +74,3 @@ jobs: displayName: Publish BuildLogs continueOnError: true condition: succeededOrFailed() - - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - # Check if the tarball should be built now so the result can be used in the build tarball job condition. - # This prevents allocation of additional agents if the tarball build legs should be skipped. - # Only build the tarball if the PR touches source-build source. - - script: | - if curl "https://api.github.com/repos/dotnet/installer/pulls/$(System.PullRequest.PullRequestNumber)/files" | grep '"filename": "src/SourceBuild/*' - then - echo "##vso[task.setvariable variable=_includeTarballBuild;isoutput=true]true" - fi - displayName: Tarball Build Check - name: Tarball_Build_Check diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml index d927cf7f0..471f00e27 100644 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml +++ b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml @@ -1,9 +1,6 @@ # Builds a source-build tarball parameters: - # Custom condition to apply to the job - condition: true - # Dependent jobs that must be completed before this job will run dependsOn: @@ -32,7 +29,6 @@ jobs: - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml parameters: architecture: x64 - condition: ${{ parameters.condition }} dependsOn: ${{ parameters.dependsOn }} ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: excludeSdkContentTests: true @@ -86,7 +82,6 @@ jobs: - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml parameters: architecture: arm64 - condition: ${{ parameters.condition }} dependsOn: ${{ parameters.dependsOn }} ${{ if in(variables['Build.Reason'], 'PullRequest') }}: excludeSdkContentTests: true @@ -108,7 +103,7 @@ jobs: architecture: x64 # Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status. # The bootstrap build will shortcut if the stage 1 build failed. - condition: and(${{ parameters.condition }}, succeededOrFailed()) + condition: succeededOrFailed() dependsOn: Build_Tarball_x64 excludeSdkContentTests: true installerBuildResourceId: ${{ parameters.installerBuildResourceId }} From c12ac467c7864f98f54dc58c34ed2a8bddb2ffbc Mon Sep 17 00:00:00 2001 From: NET Source-Build Bot <102560831+dotnet-sb-bot@users.noreply.github.com> Date: Tue, 11 Oct 2022 16:42:38 -0700 Subject: [PATCH 2/5] update global.json and Versions.props for .NET SDK 6.0.110 (#14717) --- eng/Versions.props | 2 +- src/SourceBuild/tarball/content/global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 91eac63e1..475eaf7ca 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -174,7 +174,7 @@ or minor release, prebuilts may be needed. When the release is mature, prebuilts are not necessary, and this property is removed from the file. --> - 6.0.109-2 + 6.0.110 diff --git a/src/SourceBuild/tarball/content/global.json b/src/SourceBuild/tarball/content/global.json index 063a6c676..89a95cd0f 100644 --- a/src/SourceBuild/tarball/content/global.json +++ b/src/SourceBuild/tarball/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.109" + "dotnet": "6.0.110" }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.1", From 7aec8695348a150753366b84d1f998d9d044bad4 Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Tue, 11 Oct 2022 18:57:55 -0700 Subject: [PATCH 3/5] [release/6.0.1xx] Re-write dotnet-watch smoke test (#14367) * Re-write dotnet-watch smoke test * Revert async changes --- .../Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs | 6 ++++-- .../DotNetWatchTests.cs | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs index ae5508aa4..921ab1f97 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs @@ -96,7 +96,7 @@ internal class DotNetHelper } } - public void ExecuteCmd(string args, string? workingDirectory = null, Action? additionalProcessConfigCallback = null, int expectedExitCode = 0, int millisecondTimeout = -1) + public void ExecuteCmd(string args, string? workingDirectory = null, Action? additionalProcessConfigCallback = null, int? expectedExitCode = 0, int millisecondTimeout = -1) { (Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess( DotNetPath, @@ -105,7 +105,9 @@ internal class DotNetHelper configure: (process) => configureProcess(process, workingDirectory), millisecondTimeout: millisecondTimeout); - ExecuteHelper.ValidateExitCode(executeResult, expectedExitCode); + if (expectedExitCode != null) { + ExecuteHelper.ValidateExitCode(executeResult, (int) expectedExitCode); + } void configureProcess(Process process, string? workingDirectory) { diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs index 183311037..46013bbc7 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs +++ b/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs @@ -19,12 +19,11 @@ public class DotNetWatchTests : SmokeTests string projectDirectory = DotNetHelper.ExecuteNew(DotNetTemplate.Console.GetName(), nameof(DotNetWatchTests)); bool outputChanged = false; - // We expect an exit code of 143 (128 + 15, i.e. SIGTERM) because we are killing the process manually DotNetHelper.ExecuteCmd( "watch run", workingDirectory: projectDirectory, additionalProcessConfigCallback: processConfigCallback, - expectedExitCode: 143, + expectedExitCode: null, // The exit code does not reflect whether or not dotnet watch is working properly millisecondTimeout: 30000); Assert.True(outputChanged); @@ -52,7 +51,7 @@ public class DotNetWatchTests : SmokeTests { outputChanged = true; OutputHelper.WriteLine("Successfully re-ran program after code change."); - ExecuteHelper.ExecuteProcessValidateExitCode("kill", $"-s TERM {process.Id}", OutputHelper); + process.Kill(true); } }); } From 1a77d838c59afa155ade65f9c70a9186579a00c6 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Wed, 12 Oct 2022 18:51:21 -0700 Subject: [PATCH 4/5] Update asp.net templates (#14686) --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 475eaf7ca..8f2444de9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -131,7 +131,7 @@ 3.1.15 $(MicrosoftDotNetCommonItemTemplates31PackageVersion) $(MicrosoftDotNetTestProjectTemplates50PackageVersion) - 3.1.29 + 3.1.30 3.2.1 4.8.0-rc2.19462.10 From dbecfaddc053e1f55158ebe230959cfbf0a16a48 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:46:00 -0700 Subject: [PATCH 5/5] Update dependencies from https://github.com/dotnet/arcade build 20221012.3 (#14755) Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.CMake.Sdk From Version 6.0.0-beta.22463.7 -> To Version 6.0.0-beta.22512.3 Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 7 ------- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 2 +- eng/common/build.ps1 | 5 +++++ eng/common/init-tools-native.ps1 | 1 + global.json | 6 +++--- 6 files changed, 16 insertions(+), 17 deletions(-) diff --git a/NuGet.config b/NuGet.config index e00e01da1..9a84139e5 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,12 +7,8 @@ - - - - @@ -39,9 +35,6 @@ - - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2b8705345..295136e2a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -197,19 +197,19 @@ - + https://github.com/dotnet/arcade - 2fbe602d12256bf82de53791ddcbb964c1541b4e + bb1e72113a7eaf8bebda940beba8cf8bee1b453f - + https://github.com/dotnet/arcade - 2fbe602d12256bf82de53791ddcbb964c1541b4e + bb1e72113a7eaf8bebda940beba8cf8bee1b453f - + https://github.com/dotnet/arcade - 2fbe602d12256bf82de53791ddcbb964c1541b4e + bb1e72113a7eaf8bebda940beba8cf8bee1b453f https://github.com/dotnet/source-build-reference-packages diff --git a/eng/Versions.props b/eng/Versions.props index 86400b0ba..204c9d28f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -19,7 +19,7 @@ - 6.0.0-beta.22463.7 + 6.0.0-beta.22512.3 diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index 8943da242..33a6f2d0e 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -26,6 +26,7 @@ Param( [string] $runtimeSourceFeed = '', [string] $runtimeSourceFeedKey = '', [switch] $excludePrereleaseVS, + [switch] $nativeToolsOnMachine, [switch] $help, [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties ) @@ -67,6 +68,7 @@ function Print-Usage() { Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio" + Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)" Write-Host "" Write-Host "Command line arguments not listed above are passed thru to msbuild." @@ -146,6 +148,9 @@ try { $nodeReuse = $false } + if ($nativeToolsOnMachine) { + $env:NativeToolsOnMachine = $true + } if ($restore) { InitializeNativeTools } diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 index 7428ef880..6c7a851a8 100644 --- a/eng/common/init-tools-native.ps1 +++ b/eng/common/init-tools-native.ps1 @@ -112,6 +112,7 @@ try { $ToolPath = Convert-Path -Path $BinPath Write-Host "Adding $ToolName to the path ($ToolPath)..." Write-Host "##vso[task.prependpath]$ToolPath" + $env:PATH = "$ToolPath;$env:PATH" $InstalledTools += @{ $ToolName = $ToolDirectory.FullName } } } diff --git a/global.json b/global.json index 9d1e2d901..20ae9a5af 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.109", + "dotnet": "6.0.110", "runtimes": { "dotnet": [ "$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)" @@ -11,7 +11,7 @@ "cmake": "3.16.4" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22463.7", - "Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.22463.7" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22512.3", + "Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.22512.3" } }