Skip to content

Commit

Permalink
Toolset update: VS 2022 17.10 Preview 3 (#4576)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej authored Apr 12, 2024
1 parent 56ad825 commit c0fe1fa
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 381 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem

# How To Build With The Visual Studio IDE

1. Install Visual Studio 2022 17.10 Preview 2 or later.
1. Install Visual Studio 2022 17.10 Preview 3 or later.
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
This will ensure that you're using supported versions of CMake and Ninja.
Expand All @@ -156,7 +156,7 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem

# How To Build With A Native Tools Command Prompt

1. Install Visual Studio 2022 17.10 Preview 2 or later.
1. Install Visual Studio 2022 17.10 Preview 3 or later.
* Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer.
* We recommend selecting "C++ CMake tools for Windows" in the VS Installer.
This will ensure that you're using supported versions of CMake and Ninja.
Expand Down
1 change: 0 additions & 1 deletion azure-devops/cmake-configure-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ parameters:
- name: litFlags
type: object
default:
- '--timeout=240'
- '-j$(testParallelism)'
- '--xunit-xml-output=$(buildOutputLocation)/test-results.xml'
- '--order=lexical'
Expand Down
2 changes: 1 addition & 1 deletion azure-devops/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

variables:
- name: poolName
value: 'StlBuild-2024-03-12T1202-Pool'
value: 'StlBuild-2024-04-10T1048-Pool'
readonly: true
- name: poolDemands
value: 'EnableSpotVM -equals true'
Expand Down
37 changes: 13 additions & 24 deletions azure-devops/create-1es-hosted-pool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,11 @@ function New-Password {
Param([int]$Length = 32)

# This 64-character alphabet generates 6 bits of entropy per character.
# The power-of-2 alphabet size allows us to select a character by masking a random Byte with bitwise-AND.
$alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-'
$mask = 63
if ($alphabet.Length -ne 64) {
throw 'Bad alphabet length'
}

[Byte[]]$randomData = [Byte[]]::new($Length)
$rng = $null
try {
$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create()
$rng.GetBytes($randomData)
}
finally {
if ($null -ne $rng) {
$rng.Dispose()
}
}
$alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-'.ToCharArray()

[SecureString] $result = [SecureString]::new()
for ($idx = 0; $idx -lt $Length; $idx++) {
$result.AppendChar($alphabet[$randomData[$idx] -band $mask])
$result.AppendChar((Get-SecureRandom -InputObject $alphabet))
}

return $result
Expand Down Expand Up @@ -121,6 +104,8 @@ function Wait-Shutdown {
Display-ProgressBar -Status 'Silencing breaking change warnings'

# https://aka.ms/azps-changewarnings
$Env:SuppressAzurePowerShellBreakingChangeWarnings = 'true'

Update-AzConfig `
-DisplayBreakingChangeWarning $false `
-Scope 'Process' | Out-Null
Expand Down Expand Up @@ -231,10 +216,9 @@ $ProvisionImageResult = Invoke-AzVMRunCommand `
-ResourceGroupName $ResourceGroupName `
-VMName $ProtoVMName `
-CommandId 'RunPowerShellScript' `
-ScriptPath "$PSScriptRoot\provision-image.ps1" `
-Parameter @{ 'AdminUserPassword' = $AdminPW; }
-ScriptPath "$PSScriptRoot\provision-image.ps1"

Write-Host "provision-image.ps1 output: $($ProvisionImageResult.value.Message)"
Write-Host $ProvisionImageResult.value.Message

####################################################################################################
Display-ProgressBar -Status 'Restarting VM'
Expand Down Expand Up @@ -330,7 +314,7 @@ $ImageVersion = New-AzGalleryImageVersion `
-GalleryName $GalleryName `
-GalleryImageDefinitionName $ImageDefinitionName `
-Name $ImageVersionName `
-SourceImageId $VM.ID
-SourceImageVMId $VM.ID

####################################################################################################
Display-ProgressBar -Status 'Registering CloudTest resource provider'
Expand Down Expand Up @@ -415,4 +399,9 @@ Remove-AzNetworkSecurityGroup `
Write-Progress -Activity $ProgressActivity -Completed

Write-Host "Elapsed time: $(((Get-Date) - $CurrentDate).ToString('hh\:mm\:ss'))"
Write-Host "Finished creating pool: $PoolName"

if ((Get-AzResource -ResourceGroupName $ResourceGroupName -Name $PoolName) -ne $null) {
Write-Host "Created pool: $PoolName"
} else {
Write-Error "Failed to create pool: $PoolName"
}
Loading

0 comments on commit c0fe1fa

Please sign in to comment.