Skip to content

Commit 805dc30

Browse files
committed
windows: adjust the build invocation for Windows CI
This adjusts the flags to properly control the packaging and windows SDK arguments to allow reducing PR CI times.
1 parent 8975d1a commit 805dc30

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

utils/build-windows-toolchain.bat

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ for %%I in (%SKIP_TESTS%) do (call set TestArg=%%TestArg:%%I,=%%)
6767
if "%TestArg:~-1%"=="," (set TestArg=%TestArg:~0,-1%) else (set TestArg= )
6868

6969
:: Build the -SkipPackaging argument, if any
70-
set SkipPackagingArg=-SkipPackaging
71-
if not "%SKIP_PACKAGING%"=="1" set "SkipPackagingArg= "
70+
set PackagingArgs=-SkipPackaging
71+
if not "%SKIP_PACKAGING%"=="1" set "PackagingArgs= "
7272

73-
:: Build the -WindowsSDKArchitectures argument, if any, otherwise build all the SDKs.
74-
set "WindowsSDKArchitecturesArg= "
75-
if not "%WINDOWS_SDKS%"=="" set "WindowsSDKArchitecturesArg=-Windows -WindowsSDKArchitectures %WINDOWS_SDKS% -WindowsSDKLinkModes dynamic"
73+
:: Build the arguments related to Windows SDK builds
74+
set "WindowsSDKArgs=-Windows -WindowsSDKLinkModes dynamic"
75+
if not "%WINDOWS_SDKS%"=="" set "WindowsSDKArgs=-Windows -WindowsSDKArchitectures %WINDOWS_SDKS% -WindowsSDKLinkModes dynamic"
7676

7777
:: Build the -HostArchName argument, if any.
7878
set "HostArchNameArg="
@@ -86,10 +86,9 @@ powershell.exe -ExecutionPolicy RemoteSigned -File %~dp0build.ps1 ^
8686
-SourceCache %SourceRoot% ^
8787
-BinaryCache %BuildRoot% ^
8888
-ImageRoot %BuildRoot% ^
89-
%SkipPackagingArg% ^
90-
%WindowsSDKArchitecturesArg% ^
89+
%WindowsSDKArgs% ^
90+
%PackagingArgs% ^
9191
%TestArg% ^
92-
-SkipPackaging ^
9392
-IncludeSBoM ^
9493
-Summary || (exit /b 1)
9594

0 commit comments

Comments
 (0)