From cb8c6ee73ad56f79a11f037d50876d40f14b8284 Mon Sep 17 00:00:00 2001 From: tens0rfl0w Date: Thu, 3 Oct 2024 23:46:33 +0200 Subject: [PATCH] fix(ci/windows): Downgrade MSVC build tools Github Actions running on 'windows-latest' get shipped with VS 2022 C++ x64/x86 build tools v14.41-17.11 which includes various breaking changes. This manually downgrades VS build tools to v14.40-17.10 as a temporary fix till the build tool chain is updated. --- .github/workflows/ci_build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 1ab4f39f0f..386f62222d 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -44,6 +44,22 @@ jobs: git pull origin $GITHUB_REF:PR_BRANCH --depth=1 git submodule update --jobs=$JOB_SLOTS --init --depth=1 + - name: Downgrade MSVC build tools + if: ${{ env.PLATFORM == 'windows' }} + shell: pwsh + run: | + # Temporary workaround till build toolchain is updated + Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" + $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" + + # Remove latest version + $Arguments = ('modify', '--installPath', "`"$InstallPath`"", '--remove', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', '--remove', 'Microsoft.VisualStudio.Component.VC.ATL', '--quiet', '--norestart', '--nocache') + Start-Process -FilePath vs_installer.exe -ArgumentList $Arguments -Wait + + # Install last supported version (v14.40-17.10) + $Arguments = ('modify', '--installPath', "`"$InstallPath`"", '--add', 'Microsoft.VisualStudio.Component.VC.14.40.17.10.x86.x64', '--add', 'Microsoft.VisualStudio.Component.VC.14.40.17.10.ATL', '--quiet', '--norestart', '--nocache') + Start-Process -FilePath vs_installer.exe -ArgumentList $Arguments -Wait + - name: Dependencies shell: bash run: |