aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-11-17 15:15:06 +0000
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-11-17 15:15:06 +0000
commit91d5bd8ac9a28725c735f8e6900bc85673bb190a (patch)
treef82163cdbbf78530df969733c60655c9501029aa /.github
parent98b0acda0f00df3f62a61646d323c8367ddebd68 (diff)
ci: Avoid toolset ambiguity that MSVC can't handle
This change is required to work with the new windows-2022 image version 20231115 properly.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1cd40be541..8b4de792ec 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -136,6 +136,55 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
+ - name: Fix Visual Studio installation
+ # Avoid toolset ambiguity that MSVC can't handle.
+ run: |
+ Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
+ $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
+ $componentsToRemove= @(
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM64.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM64"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM64.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM64"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM64.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM64"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.x86.x64.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.37.17.7.x86.x64"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM64"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM64.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM64"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM64.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM64"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM64.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.Spectre"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64"
+ "Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64.Spectre"
+ )
+ [string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
+ $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
+ # should be run twice
+ $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
+ $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
+
- name: Configure Developer Command Prompt for Microsoft Visual C++
# Using microsoft/setup-msbuild is not enough.
uses: ilammy/msvc-dev-cmd@v1