Skip to content
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

Toolset update: VS 2022 17.10 Preview 3 #4576

Merged
merged 28 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8449e79
Drop the PsExec dance, but keep the PowerShell 7.4.1 upgrade.
StephanTLavavej Mar 29, 2024
754f7a5
Add `exit` to improve the transcript.
StephanTLavavej Mar 29, 2024
e4c6caf
We don't need the PowerShell call operator when invoking curl.exe.
StephanTLavavej Mar 29, 2024
b94a6b2
Cleanup the transcript and all downloaded files.
StephanTLavavej Mar 29, 2024
92e5680
Extract Python args.
StephanTLavavej Mar 29, 2024
f383096
Wrap Python installation in try-catch.
StephanTLavavej Mar 29, 2024
58c359e
For Python, use `/quiet` instead of `/passive`, and don't install docs.
StephanTLavavej Mar 29, 2024
b3fa19d
Move `$ProgressPreference` to the top, drop duplicate `$ErrorActionPr…
StephanTLavavej Mar 29, 2024
75e0476
We can directly invoke pwsh, no need for a transcript.
StephanTLavavej Mar 29, 2024
d840dc8
Dramatically simplify code with `Get-SecureRandom`.
StephanTLavavej Mar 29, 2024
349488d
Suppress breaking change warnings from `Update-AzConfig` itself.
StephanTLavavej Mar 29, 2024
179fba4
Simply inline `PrintMsiExitCodeMessage`.
StephanTLavavej Mar 29, 2024
e86c0c4
Simplify script output.
StephanTLavavej Mar 29, 2024
7b21e5b
Directly invoke the VS installer without `cmd.exe /c`.
StephanTLavavej Mar 29, 2024
cfc5bae
Grand unified `DownloadAndInstall`.
StephanTLavavej Mar 29, 2024
21b2703
Always disable positional binding, make all parameters mandatory.
StephanTLavavej Mar 29, 2024
acbf5f6
Fix VSO-1784520 by dropping `psutil` and `--timeout=240`.
StephanTLavavej Mar 29, 2024
63128a7
Simplify output. [Tested up to here.]
StephanTLavavej Mar 29, 2024
9cbc14c
Python 3.12.3.
StephanTLavavej Apr 10, 2024
d40e61f
`New-AzGalleryImageVersion` needs `-SourceImageVMId` in Azure PowerSh…
StephanTLavavej Apr 10, 2024
eaab19c
VS 2022 17.10 Preview 3.
StephanTLavavej Apr 10, 2024
7b36523
Print whether pool creation was successful.
StephanTLavavej Apr 10, 2024
12b068b
Style: `} else {`
StephanTLavavej Apr 10, 2024
fceb55f
New pool.
StephanTLavavej Apr 10, 2024
1cb6d6b
Remove `_VCRT_EXPORT_STD` workarounds.
StephanTLavavej Apr 10, 2024
2746fe0
Remove workaround for VSO-1975579.
StephanTLavavej Apr 10, 2024
514d0ae
Fix DevCom-1586179 VSO-1439353 by removing workarounds for VSO-119526…
StephanTLavavej Apr 10, 2024
9b5fc60
Fix test: `ranges::dangling` is non-trivial (properly detected by Cla…
StephanTLavavej Apr 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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