Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
36 changes: 36 additions & 0 deletions .vsts-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,42 @@ jobs:
continueOnError: true
condition: always()

- job: BootstrapMSBuildWithMTModeOnWindows
displayName: "Windows Core Multithreaded Mode"
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCore-Public
demands: ImageOverride -equals windows.vs2026preview.scout.amd64.open
${{ if ne(variables['System.TeamProject'], 'public') }}:
name: VSEng-MicroBuildVSStable
demands: agent.os -equals Windows_NT
timeoutInMinutes: 120
steps:
- template: azure-pipelines/check-documentation-only-change.yml
- ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
- task: PowerShell@2
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- task: BatchScript@1
displayName: 'Build with bootstrapped MSBuild and -mt mode'
inputs:
filename: 'eng/cibuild_bootstrapped_msbuild.cmd'
arguments: '-msbuildEngine dotnet -onlyDocChanged $(onlyDocChanged) -skipTests -stage2Properties "/mt /p:BuildAnalyzer=true"'
condition: eq(variables.onlyDocChanged, 0)
env:
MSBUILDUSESERVER: "1"
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: logs'
inputs:
PathtoPublish: 'artifacts/log/Debug'
ArtifactName: 'MTModeOnWindows build logs'
continueOnError: true
condition: always()

- job: FullReleaseOnWindows
displayName: "Windows Full Release (no bootstrap)"
variables:
Expand Down
16 changes: 13 additions & 3 deletions eng/cibuild_bootstrapped_msbuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Param(
[switch] $prepareMachine,
[bool] $buildStage1 = $True,
[bool] $onlyDocChanged = 0,
[switch] $skipTests,
[string] $stage2Properties = "",
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)

Expand Down Expand Up @@ -117,14 +119,22 @@ try {
# Opt into performance logging. https://github.com/dotnet/msbuild/issues/5900
$env:DOTNET_PERFLOG_DIR=$PerfLogDir

# Mirrors cibuild_bootstrapped_msbuild.sh. Some MSBuild scenarios (notably /mt routing tasks
# to a sidecar TaskHost) require this so the apphost-based child can locate the runtime.
# The SDK CLI (`dotnet msbuild`) sets it automatically; `dotnet exec MSBuild.dll` does not.
$env:DOTNET_HOST_PATH=$dotnetExePath
Comment thread
JanProvaznik marked this conversation as resolved.
Outdated

# When using bootstrapped MSBuild:
# - Turn off node reuse (so that bootstrapped MSBuild processes don't stay running and lock files)
# - Create bootstrap environment as it's required when also running tests
if ($onlyDocChanged) {
& $PSScriptRoot\Common\Build.ps1 -restore -build -ci /p:CreateBootstrap=false /nr:false @properties
# - $stage2Properties are appended to the stage 2 build only (matching cibuild_bootstrapped_msbuild.sh).
# Use this for switches like /mt that should not be passed to the SDK MSBuild used in stage 1.
Comment thread
JanProvaznik marked this conversation as resolved.
Outdated
$stage2Args = if ($stage2Properties) { $stage2Properties -split '\s+' | Where-Object { $_ } } else { @() }
if ($onlyDocChanged -or $skipTests) {
Comment thread
JanProvaznik marked this conversation as resolved.
Outdated
& $PSScriptRoot\Common\Build.ps1 -restore -build -ci /p:CreateBootstrap=false /nr:false @properties @stage2Args
}
else {
& $PSScriptRoot\Common\Build.ps1 -restore -build -test -ci /nr:false @properties
& $PSScriptRoot\Common\Build.ps1 -restore -build -test -ci /nr:false @properties @stage2Args
}

exit $lastExitCode
Expand Down
Loading