diff options
| author | JakobL-MSFT <[email protected]> | 2023-02-08 15:36:56 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-08 15:36:56 -0800 |
| commit | d717aac5bd009f63670f1e164bacf2972931de1d (patch) | |
| tree | 03728e56d8dd269386ce70fc8b9aaa1a2e5cdfaf /Build-AllSamples.ps1 | |
| parent | 08607873c07b796e912560b7fa359b06e1a21404 (diff) | |
Enable CodeQL to work thru reasonable workarounds - Cherry pick to main (#863)
Enable CodeQL to work thru reasonable workarounds. (#857)
Diffstat (limited to 'Build-AllSamples.ps1')
| -rw-r--r-- | Build-AllSamples.ps1 | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Build-AllSamples.ps1 b/Build-AllSamples.ps1 index fb876d99..2cf7f403 100644 --- a/Build-AllSamples.ps1 +++ b/Build-AllSamples.ps1 @@ -9,14 +9,17 @@ This script searches for all available Visual Studio Solutions (.sln files) and A regular expression matching the samples to be built. Default is '' that matches all samples. Examples include '^tools.' or '.dchu'. .PARAMETER Configurations -A list of configurations to build samples under. Values available are 'Debug' and 'Release'. By default, $env:Configuration will be used as the sole configuration to build for. If this environment variable is not set the default is 'Debug' and 'Release'. +A list of configurations to build samples under. Values available are 'Debug' and 'Release'. By default, $env:WDS_Configuration will be used as the sole configuration to build for. If this environment variable is not set the default is 'Debug' and 'Release'. .PARAMETER Platforms -A list of platforms to build samples under (e.g. 'x64', 'arm64'). By default, $env:Platform will be used as the sole platform to build for. If this environment variable is not set the default is 'x64' and'arm64'. +A list of platforms to build samples under (e.g. 'x64', 'arm64'). By default, $env:WDS_Platform will be used as the sole platform to build for. If this environment variable is not set the default is 'x64' and'arm64'. .PARAMETER LogFilesDirectory Path to a directory where the log files will be written to. If not provided, outputs will be logged to the '_logs' directory within the current working directory. +.PARAMETER ThrottleLimit +An integer indicating how many combinations to build in parallel. If 0 or not provided this defaults to 5 x number of logical processors. + .INPUTS None. @@ -27,16 +30,17 @@ None. .\Build-AllSamples .EXAMPLE -.\Build-AllSamples -Samples '^tools.' -Configurations 'Debug','Release' -Platforms 'x64','arm64' -LogFilesDirectory .\_logs +.\Build-AllSamples -Samples '^tools.' -Configurations 'Debug','Release' -Platforms 'x64','arm64' #> [CmdletBinding()] param( [string]$Samples = "", - [string[]]$Configurations = @([string]::IsNullOrEmpty($env:Configuration) ? ('Debug','Release') : $env:Configuration), - [string[]]$Platforms = @([string]::IsNullOrEmpty($env:Platform) ? ('x64','arm64') : $env:Platform), - [string]$LogFilesDirectory = (Join-Path (Get-Location) "_logs") + [string[]]$Configurations = @([string]::IsNullOrEmpty($env:WDS_Configuration) ? ('Debug','Release') : $env:WDS_Configuration), + [string[]]$Platforms = @([string]::IsNullOrEmpty($env:WDS_Platform) ? ('x64','arm64') : $env:WDS_Platform), + [string]$LogFilesDirectory = (Join-Path (Get-Location) "_logs"), + [int]$ThrottleLimit ) $Verbose = $false @@ -63,6 +67,4 @@ foreach ($file in $solutionFiles) { } } - - -.\Build-SampleSet -SampleSet $sampleSet -Configurations $Configurations -Platform $Platforms -LogFilesDirectory $LogFilesDirectory -Verbose:$Verbose +.\Build-SampleSet -SampleSet $sampleSet -Configurations $Configurations -Platform $Platforms -LogFilesDirectory $LogFilesDirectory -Verbose:$Verbose -ThrottleLimit $ThrottleLimit |
