diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6466be573d..036c855acc 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,103 +1,103 @@ - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 - + https://github.com/dotnet/dotnet - 8c56ff58fc59fd33fc1dab5c6a7155ca16511bb2 + 51587e2f3d5f86ca27184a6b5e8a778841d05b31 diff --git a/eng/Versions.props b/eng/Versions.props index bbca66b48d..569835e22d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,55 +11,55 @@ $(MicrosoftBuildPackageVersion) - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 11.0.0-preview.1.26067.103 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 3.0.0 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 - 11.0.0-preview.2.26108.103 + 11.0.0-preview.3.26121.104 0.5.638 0.47.0 5.0.0 diff --git a/eng/common/templates/steps/vmr-sync.yml b/eng/common/templates/steps/vmr-sync.yml index 599afb6186..eb619c5026 100644 --- a/eng/common/templates/steps/vmr-sync.yml +++ b/eng/common/templates/steps/vmr-sync.yml @@ -38,27 +38,6 @@ steps: displayName: Label PR commit workingDirectory: $(Agent.BuildDirectory)/repo -- script: | - vmr_sha=$(grep -oP '(?<=Sha=")[^"]*' $(Agent.BuildDirectory)/repo/eng/Version.Details.xml) - echo "##vso[task.setvariable variable=vmr_sha]$vmr_sha" - displayName: Obtain the vmr sha from Version.Details.xml (Unix) - condition: ne(variables['Agent.OS'], 'Windows_NT') - workingDirectory: $(Agent.BuildDirectory)/repo - -- powershell: | - [xml]$xml = Get-Content -Path $(Agent.BuildDirectory)/repo/eng/Version.Details.xml - $vmr_sha = $xml.SelectSingleNode("//Source").Sha - Write-Output "##vso[task.setvariable variable=vmr_sha]$vmr_sha" - displayName: Obtain the vmr sha from Version.Details.xml (Windows) - condition: eq(variables['Agent.OS'], 'Windows_NT') - workingDirectory: $(Agent.BuildDirectory)/repo - -- script: | - git fetch --all - git checkout $(vmr_sha) - displayName: Checkout VMR at correct sha for repo flow - workingDirectory: ${{ parameters.vmrPath }} - - script: | git config --global user.name "dotnet-maestro[bot]" git config --global user.email "dotnet-maestro[bot]@users.noreply.github.com" diff --git a/eng/common/templates/vmr-build-pr.yml b/eng/common/templates/vmr-build-pr.yml index ce3c29a62f..2f3694fa13 100644 --- a/eng/common/templates/vmr-build-pr.yml +++ b/eng/common/templates/vmr-build-pr.yml @@ -34,6 +34,7 @@ resources: type: github name: dotnet/dotnet endpoint: dotnet + ref: refs/heads/main # Set to whatever VMR branch the PR build should insert into stages: - template: /eng/pipelines/templates/stages/vmr-build.yml@vmr diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index f6bde26837..01296ee601 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -588,6 +588,11 @@ function LocateVisualStudio([object]$vsRequirements = $null){ return $null } + if ($null -eq $vsInfo -or $vsInfo.Count -eq 0) { + throw "No instance of Visual Studio meeting the requirements specified was found. Requirements: $($args -join ' ')" + return $null + } + # use first matching instance return $vsInfo[0] } @@ -820,6 +825,11 @@ function MSBuild-Core() { $cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci" + # Add -mt flag for MSBuild multithreaded mode if enabled via environment variable + if ($env:MSBUILD_MT_ENABLED -eq "1") { + $cmdArgs += ' -mt' + } + if ($warnAsError) { $cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true' } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 6c121300ac..edc7b128cf 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -522,7 +522,13 @@ function MSBuild-Core { } } - RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" + # Add -mt flag for MSBuild multithreaded mode if enabled via environment variable + local mt_switch="" + if [[ "${MSBUILD_MT_ENABLED:-}" == "1" ]]; then + mt_switch="-mt" + fi + + RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" } function GetDarc { diff --git a/eng/common/vmr-sync.ps1 b/eng/common/vmr-sync.ps1 index 97302f3205..b37992d91c 100644 --- a/eng/common/vmr-sync.ps1 +++ b/eng/common/vmr-sync.ps1 @@ -103,12 +103,20 @@ Set-StrictMode -Version Latest Highlight 'Installing .NET, preparing the tooling..' . .\eng\common\tools.ps1 $dotnetRoot = InitializeDotNetCli -install:$true +$env:DOTNET_ROOT = $dotnetRoot $darc = Get-Darc -$dotnet = "$dotnetRoot\dotnet.exe" Highlight "Starting the synchronization of VMR.." # Synchronize the VMR +$versionDetailsPath = Resolve-Path (Join-Path $PSScriptRoot '..\Version.Details.xml') | Select-Object -ExpandProperty Path +[xml]$versionDetails = Get-Content -Path $versionDetailsPath +$repoName = $versionDetails.SelectSingleNode('//Source').Mapping +if (-not $repoName) { + Fail "Failed to resolve repo mapping from $versionDetailsPath" + exit 1 +} + $darcArgs = ( "vmr", "forwardflow", "--tmp", $tmpDir, @@ -130,9 +138,27 @@ if ($LASTEXITCODE -eq 0) { Highlight "Synchronization succeeded" } else { - Fail "Synchronization of repo to VMR failed!" - Fail "'$vmrDir' is left in its last state (re-run of this script will reset it)." - Fail "Please inspect the logs which contain path to the failing patch file (use -debugOutput to get all the details)." - Fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script." - exit 1 + Highlight "Failed to flow code into the local VMR. Falling back to resetting the VMR to match repo contents..." + git -C $vmrDir reset --hard + + $resetArgs = ( + "vmr", "reset", + "${repoName}:HEAD", + "--vmr", $vmrDir, + "--tmp", $tmpDir, + "--additional-remotes", "${repoName}:${repoRoot}" + ) + + & "$darc" $resetArgs + + if ($LASTEXITCODE -eq 0) { + Highlight "Successfully reset the VMR using 'darc vmr reset'" + } + else { + Fail "Synchronization of repo to VMR failed!" + Fail "'$vmrDir' is left in its last state (re-run of this script will reset it)." + Fail "Please inspect the logs which contain path to the failing patch file (use -debugOutput to get all the details)." + Fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script." + exit 1 + } } diff --git a/eng/common/vmr-sync.sh b/eng/common/vmr-sync.sh index 44239e331c..198caec59b 100644 --- a/eng/common/vmr-sync.sh +++ b/eng/common/vmr-sync.sh @@ -186,6 +186,13 @@ fi # Synchronize the VMR +version_details_path=$(cd "$scriptroot/.."; pwd -P)/Version.Details.xml +repo_name=$(grep -m 1 '