Skip to content
Open
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
2 changes: 1 addition & 1 deletion eng/Version.Details.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This file should be imported by eng/Versions.props
<MicrosoftCodeAnalysisFeaturesPackageVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisFeaturesPackageVersion>
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.0.0-2.25480.7</MicrosoftVisualStudioLanguageServicesPackageVersion>
<!-- dotnet/arcade dependencies -->
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26117.6</MicrosoftDotNetArcadeSdkPackageVersion>
<MicrosoftDotNetArcadeSdkPackageVersion>10.0.0-beta.26123.2</MicrosoftDotNetArcadeSdkPackageVersion>
<!-- _git/dotnet-optimization dependencies -->
<optimizationlinuxarm64MIBCRuntimePackageVersion>1.0.0-prerelease.26117.2</optimizationlinuxarm64MIBCRuntimePackageVersion>
<optimizationlinuxx64MIBCRuntimePackageVersion>1.0.0-prerelease.26117.2</optimizationlinuxx64MIBCRuntimePackageVersion>
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26117.6">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="10.0.0-beta.26123.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>eae2786f0de623ee284aea80713ec2c61531e9bd</Sha>
<Sha>4d898652733deb7dd274237ac06d27ee2ad85b36</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.26117.2">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
Expand Down
21 changes: 0 additions & 21 deletions eng/common/templates/steps/vmr-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions eng/common/templates/vmr-build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,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'
}
Expand Down
8 changes: 7 additions & 1 deletion eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,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 {
Expand Down
38 changes: 32 additions & 6 deletions eng/common/vmr-sync.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
}
}
30 changes: 25 additions & 5 deletions eng/common/vmr-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ fi

# Synchronize the VMR

version_details_path=$(cd "$scriptroot/.."; pwd -P)/Version.Details.xml
repo_name=$(grep -m 1 '<Source ' "$version_details_path" | sed -n 's/.*Mapping="\([^"]*\)".*/\1/p')
if [[ -z "$repo_name" ]]; then
fail "Failed to resolve repo mapping from $version_details_path"
exit 1
fi

export DOTNET_ROOT="$dotnetDir"

"$darc_tool" vmr forwardflow \
Expand All @@ -199,9 +206,22 @@ export DOTNET_ROOT="$dotnetDir"
if [[ $? == 0 ]]; then
highlight "Synchronization succeeded"
else
fail "Synchronization of repo to VMR failed!"
fail "'$vmr_dir' 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 --debug 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 "$vmr_dir" reset --hard

"$darc_tool" vmr reset \
"$repo_name:HEAD" \
--vmr "$vmr_dir" \
--tmp "$tmp_dir" \
--additional-remotes "$repo_name:$repo_root"

if [[ $? == 0 ]]; then
highlight "Successfully reset the VMR using 'darc vmr reset'"
else
fail "Synchronization of repo to VMR failed!"
fail "'$vmr_dir' 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 --debug 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
fi
fi
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"xcopy-msbuild": "18.0.0"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26117.6",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26123.2",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2"
}
}
Loading