Revert win2022 image back to latest and add msvc version mitigation (#5539)

* Revert win2022 image back to latest
* Workaround fix for MSVC SxS issue
This commit is contained in:
Daniel Jurek 2024-04-18 15:11:36 -07:00 committed by GitHub
parent 94cba7934b
commit ad30d104d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 39 additions and 13 deletions

2
.vscode/cspell.json vendored
View File

@ -65,6 +65,7 @@
"AMQPS",
"amqpvalue",
"AMQPVALUE",
"ATLMFC",
"australiacentral",
"australiaeast",
"authcid",
@ -206,6 +207,7 @@
"Ragrs",
"Ragzrs",
"Reconnector",
"Redist",
"rehydrated",
"Reitz",
"retriable",

View File

@ -200,6 +200,10 @@ jobs:
workingDirectory: $(Agent.TempDirectory)
displayName: Download and Install Doxygen
- template: /eng/pipelines/templates/steps/install-cmake.yml
- template: /eng/pipelines/templates/steps/setup-msvc.yml
- template: /eng/pipelines/templates/steps/vcpkg.yml
- template: /eng/pipelines/templates/steps/cmake-build.yml

View File

@ -111,6 +111,8 @@ jobs:
- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml
- template: /eng/pipelines/templates/steps/setup-msvc.yml
- template: /eng/pipelines/templates/steps/install-cmake.yml
- pwsh: sudo apt update && sudo apt install -y $(AptDependencies)

View File

@ -77,6 +77,8 @@ jobs:
- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml
- template: /eng/pipelines/templates/steps/setup-msvc.yml
- template: /eng/pipelines/templates/steps/install-cmake.yml
- pwsh: sudo apt update && sudo apt install -y $(AptDependencies)

View File

@ -104,6 +104,8 @@ jobs:
- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml
- template: /eng/pipelines/templates/steps/setup-msvc.yml
- template: /eng/pipelines/templates/steps/install-cmake.yml
# Add g++5 repo to ubuntu

View File

@ -1,3 +1,6 @@
# This temporary fix resolves an issue with CMake and vcpkg. When Linux and
# Windows agents have a later version of CMake installed this can be removed.
parameters:
Version: '3.29.2'
@ -9,21 +12,11 @@ steps:
&& sudo ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir \
&& sudo rm cmakeinstall.sh
displayName: Install Cmake ${{ parameters.Version }} (Linux)
condition: eq(variables['Agent.OS'], 'Linux')
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: |
$tempFile = New-TemporaryFile;
systeminfo.exe /fo csv > $tempFile
$osName = (Import-Csv $tempFile).'OS Name'
Write-Host "OS Name: $osName"
if (!($osName -like '*2019*')) {
Write-Host "OS is not Windows Server 2019, skipping CMake installation"
exit 0
}
Write-Host "Installing CMake ${{ parameters.Version }}"
Invoke-WebRequest -Uri https://github.com/Kitware/CMake/releases/download/v${{ parameters.Version }}/cmake-${{ parameters.Version }}-windows-x86_64.msi -OutFile cmake.msi
msiexec.exe /i cmake.msi | Wait-Process
displayName: Install Cmake ${{ parameters.Version }} (Windows)
condition: eq(variables['Agent.OS'], 'Windows_NT')
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

View File

@ -0,0 +1,21 @@
# This temporary fix resolves an issue on Win2022 machines that have multiple
# MSVC versions installed side-by-side. When this issue is resolved, remove this
# template and references:
# https://github.com/actions/runner-images/issues/9701
steps:
- pwsh: |
$tempFile = New-TemporaryFile;
systeminfo.exe /fo csv > $tempFile
$osName = (Import-Csv $tempFile).'OS Name'
Write-Host "OS Name: $osName"
if (!($osName -like '*2022*')) {
Write-Host "OS is not Windows Server 2022, skipping MSVC changes"
exit 0
}
Remove-item 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.*' -Force
Get-ChildItem 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\' -Name | Write-Host
displayName: Setup MSVC
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

View File

@ -17,7 +17,7 @@ variables:
- name: LINUXNEXTVMIMAGE
value: azsdk-pool-mms-ubuntu-2204-1espt
- name: WINDOWSVMIMAGE
value: 1espt-win-2022-cpp-rollback
value: azsdk-pool-mms-win-2022-1espt
- name: WINDOWSPREVIOUSVMIMAGE
value: azsdk-pool-mms-win-2019-1espt
- name: MACVMIMAGE