mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Merge bitcoin/bitcoin#28905: ci: Avoid toolset ambiguity that MSVC can't handle
91d5bd8ac9
ci: Avoid toolset ambiguity that MSVC can't handle (Hennadii Stepanov) Pull request description: This PR introduces a workaround, which is similar to the one removed in https://github.com/bitcoin/bitcoin/pull/28796, required to work with the new windows-2022 image version [20231115](https://github.com/actions/runner-images/blob/win22/20231115.2/images/windows/toolsets/toolset-2022.json) properly. Tested on the following image versions: - [20231029.1.0](https://github.com/hebasto/bitcoin/actions/runs/6904313692/job/18784722567) - [20231115.2.0](https://github.com/hebasto/bitcoin/actions/runs/6905808606/job/18789398318) Fixes https://github.com/bitcoin/bitcoin/issues/28901. ACKs for top commit: maflcko: lgtm ACK91d5bd8ac9
, assuming it fixes the CI failures TheCharlatan: utACK91d5bd8ac9
pablomartin4btc: utACK91d5bd8ac9
Tree-SHA512: 13c325a24e09cdaa26b04a1c8c9968fe3525d1c0c887d42739c51fdb62c184667367cf56d0e7f64ff616b1f62998f28197b95291164418bb29c576b3f738a6a7
This commit is contained in:
commit
daa56f7f66
1 changed files with 49 additions and 0 deletions
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue