Update dev build cycle time#1578
Conversation
Co-authored-by: Copilot <copilot@github.com>
|
(Ignore the branch name, it's the third cppwinrt branch I have locally...) |
| if "%target_platform%"=="" set "target_platform=x64" | ||
|
|
||
| set "vsdevcmd_arch=" | ||
| if /I "%target_platform%"=="x86" set "vsdevcmd_arch=x86" |
There was a problem hiding this comment.
If host architecture is x64, it's probably best to use x64_x86 to use the x64 compiler and get the advantage of a larger address space.
And if you want to go the extra mile, you should probably do the same for arm64 so that you can cross-compile arm64 on Windows (though this may not be super useful given that it's called from the 'build_test_all' script, so the testing part wouldn't work out so well.
There was a problem hiding this comment.
Sure, I'll check it out. I agree that the 'run tests cross arch' probably isn't going to work out a certain matrix.
There was a problem hiding this comment.
Though I do realize now this is calling VsDevCmd instead of vcvarsall, so maybe it's handled differently there.
There was a problem hiding this comment.
Pull request overview
This PR updates the local Windows build workflow for C++/WinRT development by adding Visual Studio environment bootstrapping, consolidating some MSBuild invocations, and wiring cppwinrt to depend on fast_fwd. It fits into the repo’s existing command-driven build/test pipeline for producing _build artifacts and running native test binaries.
Changes:
- Added
ensure_vsbuild.cmdto locate Visual Studio/MSBuild tooling from a plaincmd.exesession. - Refactored
build_test_all.cmdto stop on errors and combine multiple solution target builds into a single MSBuild invocation. - Added a
fast_fwdproject reference tocppwinrtand ignored the_buildoutput directory in Git.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| ensure_vsbuild.cmd | New helper script to locate vswhere, run VsDevCmd, and resolve MSBuild. |
| cppwinrt/cppwinrt.vcxproj | Adds a project reference from cppwinrt to fast_fwd. |
| build_test_all.cmd | Uses the new environment helper, adds fail-fast checks, and consolidates test-target builds. |
| .gitignore | Ignores the _build artifact directory used by build scripts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| call .nuget\nuget.exe restore natvis\cppwinrtvisualizer.sln | ||
| call .nuget\nuget.exe restore test\nuget\NugetTest.sln | ||
|
|
||
| call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:fast_fwd |
| call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln "/t:%cppwinrt_targets%" | ||
| if errorlevel 1 exit /b %errorlevel% | ||
|
|
||
| call msbuild /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% test\nuget\NugetTest.sln |
| call msbuild /p:Configuration=%target_configuration%,Platform=%target_platform%,Deployment=Component;CppWinRTBuildVersion=%target_version% natvis\cppwinrtvisualizer.sln | ||
| if errorlevel 1 exit /b %errorlevel% | ||
|
|
||
| call msbuild /p:Configuration=%target_configuration%,Platform=%target_platform%,Deployment=Standalone;CppWinRTBuildVersion=%target_version% natvis\cppwinrtvisualizer.sln |
Noodling on some quality-of-life enhancements for dev builds.
VsDevCmdusingvswhere.exe