-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add CI job for 2-stage build with -mt multithreaded mode #13124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hello @@copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo. |
Co-authored-by: JanProvaznik <[email protected]>
|
the job is failing @copilot Check failure on line 72 in .dotnet\sdk\10.0.101\Microsoft.Common.CrossTargeting.targets @azure-pipelines .dotnet\sdk\10.0.101\Microsoft.Common.CrossTargeting.targets(72,5): error MSB3202: The project file "Microsoft.Build.Framework.csproj" was not found. @azure-pipelines .dotnet\sdk\10.0.101\Microsoft.Common.CrossTargeting.targets(72,5): error MSB3202: The project file "Microsoft.Build.Framework.csproj" was not found. @azure-pipelines .dotnet\sdk\10.0.101\Microsoft.Common.CrossTargeting.targets(72,5): error MSB3202: The project file "Microsoft.Build.Framework.csproj" was not found. @azure-pipelines .dotnet\sdk\10.0.101\Microsoft.Common.CurrentVersion.targets(1844,5): error MSB3202: (NETCORE_ENGINEERING_TELEMETRY=Build) The project file "..\Framework\Microsoft.Build.Framework.csproj" was not found. @azure-pipelines .dotnet\sdk\10.0.101\Microsoft.Common.CurrentVersion.targets(1844,5): error MSB3202: (NETCORE_ENGINEERING_TELEMETRY=Build) The project file "..\Utilities\Microsoft.Build.Utilities.csproj" was not found. |
Co-authored-by: JanProvaznik <[email protected]>
Fixed in a0f9761. The issue was that Added a new |
|
@copilot I don't want this new CI job to run tests, only do the 2 stage build and upload logs from building |
Co-authored-by: JanProvaznik <[email protected]>
Fixed in 567faf6. Added a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds CI validation for MSBuild's experimental -mt (multithreaded) mode by introducing a new Windows CI job that performs a 2-stage bootstrap build with the /mt flag applied only to the second stage.
Changes:
- Added new CI job
BootstrapMSBuildWithMTModethat builds MSBuild using the dotnet engine with/mtflag in Stage 2 - Extended
cibuild_bootstrapped_msbuild.ps1withskipTestsswitch andstage2Propertiesparameter to support custom Stage 2-only MSBuild properties - Stage 1 intentionally excludes
stage2Propertiessince/mtis incompatible with the SDK MSBuild used in Stage 1
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.vsts-dotnet-ci.yml |
Adds new CI job BootstrapMSBuildWithMTMode on Windows 2022 that performs 2-stage build with /mt flag, publishes build logs, and skips tests |
eng/cibuild_bootstrapped_msbuild.ps1 |
Adds skipTests switch and stage2Properties string array parameter; applies stage2Properties only to Stage 2 builds with clear comments explaining the exclusion from Stage 1 |
.vsts-dotnet-ci.yml
Outdated
| - job: BootstrapMSBuildWithMTMode | ||
| displayName: "Windows Core Multithreaded Mode" | ||
| pool: | ||
| vmImage: 'windows-2022' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care about Windows specifically? If not it might be cheaper or faster to use a Linux queue for this.
|
@copilot make the job run on linux instead |
Co-authored-by: JanProvaznik <[email protected]>
eng/cibuild_bootstrapped_msbuild.ps1
Outdated
| [bool] $buildStage1 = $True, | ||
| [bool] $onlyDocChanged = 0, | ||
| [switch] $skipTests, | ||
| [string[]] $stage2Properties = @(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert @copilot yagni
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted in e0f78f1. The PowerShell script is back to its original state since the job now runs on Linux.
Co-authored-by: JanProvaznik <[email protected]>
Context
End-to-end validation is needed for MSBuild's experimental
-mt(multithreaded) mode. Currently no CI check verifies that MSBuild can build itself using this mode.Changes Made
Added new CI job
BootstrapMSBuildWithMTModein.vsts-dotnet-ci.yml:/mtflag passed only to Stage 2 (bootstrapped MSBuild)ubuntu-latest) for faster/cheaper buildsAdded new parameters to
cibuild_bootstrapped_msbuild.sh:--stage2Properties: Allows passing MSBuild properties only to Stage 2 (the bootstrapped build)--skipTests: Switch to skip running tests in Stage 2Testing
YAML syntax validated. The job itself validates the feature by building MSBuild with
-mtmode on each PR.Notes
The
/mtflag is passed via the new--stage2Propertiesparameter which is only splatted to Stage 2 builds. This is necessary because the/mtswitch is not compatible with the SDK MSBuild used in Stage 1.The
--skipTestsswitch ensures the CI job only performs the 2-stage build and uploads logs, without running the full test suite.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.