diff --git a/azure-devops/config.yml b/azure-devops/config.yml index 6f4bd74b19f..7c96fff32dc 100644 --- a/azure-devops/config.yml +++ b/azure-devops/config.yml @@ -7,11 +7,14 @@ variables: - name: poolName value: 'Stl-2025-10-14T1635-x64-Pool' readonly: true +- name: arm64PoolName + value: 'Stl-2025-10-27T1519-arm64-Pool' + readonly: true - name: poolDemands value: 'EnableSpotVM -equals false' readonly: true - name: vsDevCmdBat - value: '%ProgramFiles%\Microsoft Visual Studio\18\Insiders\Common7\Tools\VsDevCmd.bat' + value: 'C:\Program Files\Microsoft Visual Studio\18\Insiders\Common7\Tools\VsDevCmd.bat' readonly: true - name: tmpDir value: 'C:\stlTemp' diff --git a/azure-devops/create-1es-hosted-pool.ps1 b/azure-devops/create-1es-hosted-pool.ps1 index e72d7705f98..53ed679fcc5 100644 --- a/azure-devops/create-1es-hosted-pool.ps1 +++ b/azure-devops/create-1es-hosted-pool.ps1 @@ -7,21 +7,35 @@ Creates a 1ES Hosted Pool, set up for the STL's CI. .DESCRIPTION See https://github.com/microsoft/STL/wiki/Checklist-for-Toolset-Updates for more information. + +.PARAMETER Arch +The architecture can be either x64 or arm64. #> +[CmdletBinding(PositionalBinding=$false)] +Param( + [Parameter(Mandatory)][ValidateSet('x64', 'arm64')][String]$Arch +) $ErrorActionPreference = 'Stop' $CurrentDate = Get-Date $Timestamp = $CurrentDate.ToString('yyyy-MM-ddTHHmm') -$Arch = 'x64' $Location = 'eastus2' -$VMSize = 'Standard_F32as_v6' -$PoolSize = 64 + +if ($Arch -ieq 'x64') { + $VMSize = 'Standard_F32as_v6' + $PoolSize = 64 + $ImagePublisher = 'MicrosoftWindowsServer' + $ImageOffer = 'WindowsServer' + $ImageSku = '2025-datacenter-azure-edition' +} else { + $VMSize = 'Standard_D32ps_v6' + $PoolSize = 32 + $ImageId = '/SharedGalleries/WindowsServer.1P/Images/2025-datacenter-azure-edition-arm64/Versions/latest' +} + $ProtoVMName = 'PROTOTYPE' -$ImagePublisher = 'MicrosoftWindowsServer' -$ImageOffer = 'WindowsServer' -$ImageSku = '2025-datacenter-azure-edition' $LogFile = "1es-hosted-pool-$Timestamp-$Arch.log" $ProgressActivity = 'Preparing STL CI pool' @@ -178,12 +192,21 @@ $Nic = New-AzNetworkInterface ` #################################################################################################### Display-ProgressBar -Status 'Creating prototype VM config' -# Previously: -Priority 'Spot' -$VM = New-AzVMConfig ` - -VMName $ProtoVMName ` - -VMSize $VMSize ` - -DiskControllerType 'NVMe' ` - -Priority 'Regular' +if ($Arch -ieq 'x64') { + $VM = New-AzVMConfig ` + -VMName $ProtoVMName ` + -VMSize $VMSize ` + -DiskControllerType 'NVMe' ` + -Priority 'Regular' +} else { + $VM = New-AzVMConfig ` + -VMName $ProtoVMName ` + -VMSize $VMSize ` + -DiskControllerType 'SCSI' ` + -Priority 'Regular' ` + -SecurityType 'TrustedLaunch' ` + -SharedGalleryImageId $ImageId +} #################################################################################################### Display-ProgressBar -Status 'Setting prototype VM OS' @@ -205,12 +228,16 @@ $VM = Add-AzVMNetworkInterface ` #################################################################################################### Display-ProgressBar -Status 'Setting prototype VM source image' -$VM = Set-AzVMSourceImage ` - -VM $VM ` - -PublisherName $ImagePublisher ` - -Offer $ImageOffer ` - -Skus $ImageSku ` - -Version 'latest' +if ($Arch -ieq 'x64') { + $VM = Set-AzVMSourceImage ` + -VM $VM ` + -PublisherName $ImagePublisher ` + -Offer $ImageOffer ` + -Skus $ImageSku ` + -Version 'latest' +} else { + # We passed -SharedGalleryImageId to New-AzVMConfig above. +} #################################################################################################### Display-ProgressBar -Status 'Setting prototype VM boot diagnostic' @@ -242,7 +269,8 @@ Display-ProgressBar -Status 'Running provision-image.ps1 in VM' $ProvisionImageResult = Invoke-AzVMRunCommand ` -ResourceId $VM.ID ` -CommandId 'RunPowerShellScript' ` - -ScriptPath "$PSScriptRoot\provision-image.ps1" + -ScriptPath "$PSScriptRoot\provision-image.ps1" ` + -Parameter @{ 'Arch' = $Arch; } Write-Host $ProvisionImageResult.value.Message @@ -322,7 +350,11 @@ Display-ProgressBar -Status 'Creating image definition' $ImageDefinitionName = "$ResourceGroupName-ImageDefinition" $FeatureTrustedLaunch = @{ Name = 'SecurityType'; Value = 'TrustedLaunch'; } -$FeatureNVMe = @{ Name = 'DiskControllerTypes'; Value = 'SCSI, NVMe'; } +if ($Arch -ieq 'x64') { + $FeatureNVMe = @{ Name = 'DiskControllerTypes'; Value = 'SCSI, NVMe'; } +} else { + $FeatureNVMe = @{ Name = 'DiskControllerTypes'; Value = 'SCSI'; } +} $ImageDefinitionFeatures = @($FeatureTrustedLaunch, $FeatureNVMe) New-AzGalleryImageDefinition ` -Location $Location ` @@ -331,9 +363,10 @@ New-AzGalleryImageDefinition ` -Name $ImageDefinitionName ` -OsState 'Generalized' ` -OsType 'Windows' ` - -Publisher $ImagePublisher ` - -Offer $ImageOffer ` - -Sku $ImageSku ` + -Publisher 'StlPublisher' ` + -Offer 'StlOffer' ` + -Sku 'StlSku' ` + -Architecture $Arch ` -Feature $ImageDefinitionFeatures ` -HyperVGeneration 'V2' >> $LogFile diff --git a/azure-devops/provision-image.ps1 b/azure-devops/provision-image.ps1 index 62f28d19a93..f4cabac438d 100644 --- a/azure-devops/provision-image.ps1 +++ b/azure-devops/provision-image.ps1 @@ -10,7 +10,14 @@ create-1es-hosted-pool.ps1 (running on an STL maintainer's machine) creates a "p then runs provision-image.ps1 on that VM. This gives us full control over what we install for building and testing the STL. After provision-image.ps1 is done, create-1es-hosted-pool.ps1 makes an image of the prototype VM, creates a 1ES Hosted Pool that will spin up copies of the image as worker VMs, and finally deletes the prototype VM. + +.PARAMETER Arch +The architecture can be either x64 or arm64. #> +[CmdletBinding(PositionalBinding=$false)] +Param( + [Parameter(Mandatory)][ValidateSet('x64', 'arm64')][String]$Arch +) $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' @@ -19,14 +26,12 @@ if ($Env:COMPUTERNAME -cne 'PROTOTYPE') { Write-Error 'You should not run provision-image.ps1 on your local machine.' } -if ($Env:PROCESSOR_ARCHITECTURE -ceq 'AMD64') { +if ($Arch -ieq 'x64') { Write-Host 'Provisioning x64.' $Provisioning_x64 = $true -} elseif ($Env:PROCESSOR_ARCHITECTURE -ceq 'ARM64') { +} else { Write-Host 'Provisioning ARM64.' $Provisioning_x64 = $false -} else { - Write-Error "Unrecognized PROCESSOR_ARCHITECTURE: '$Env:PROCESSOR_ARCHITECTURE'" } $VisualStudioWorkloads = @( @@ -54,9 +59,9 @@ foreach ($workload in $VisualStudioWorkloads) { # https://github.com/PowerShell/PowerShell/releases/latest if ($Provisioning_x64) { - $PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.5.3/PowerShell-7.5.3-win-x64.msi' + $PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/PowerShell-7.5.4-win-x64.msi' } else { - $PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.5.3/PowerShell-7.5.3-win-arm64.msi' + $PowerShellUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/PowerShell-7.5.4-win-arm64.msi' } $PowerShellArgs = @('/quiet', '/norestart') diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ca0df15aad7..a01ce02bd8c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -121,15 +121,15 @@ stages: dependsOn: Build_And_Test_x64 displayName: 'Build and Test ARM64' pool: - name: ${{ variables.poolName }} + name: ${{ variables.arm64PoolName }} demands: ${{ variables.poolDemands }} jobs: - template: azure-devops/build-and-test.yml parameters: - hostArch: x64 + hostArch: arm64 targetArch: arm64 targetPlatform: arm64 - testsBuildOnly: true + numShards: 10 - stage: Build_And_Test_ARM64EC dependsOn: Build_And_Test_x64 diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 0253413ab1d..343abccc27a 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -734,7 +734,9 @@ std/depr/depr.c.headers/tgmath_h.pass.cpp:2 FAIL # *** CLANG ISSUES, NOT YET ANALYZED *** # Not analyzed. Clang apparently defines platform macros differently from C1XX. -std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp:2 FAIL +# The test inspects `__x86_64__` and `__i386__`, which MSVC doesn't define. +# SKIPPED because this fails for x64/x86 and passes for ARM64. +std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp:2 SKIPPED # Not analyzed. Possibly C++20 equality operator rewrite issues. std/utilities/expected/expected.expected/equality/equality.other_expected.pass.cpp:2 FAIL