From b7eb56350b46ab0b8aa3a38930e292262dd15a7b Mon Sep 17 00:00:00 2001 From: Felix Hanau Date: Mon, 10 Jun 2024 15:37:11 +0200 Subject: [PATCH] Work around actions/runner-images#10004 The updated runner image uses an MSVC version that expects LLVM 17, but the image also has LLVM 16 in its PATH, leaving it in a broken state. Manually install 17 and use a legacy mutex implementation to fix runtime issues as a workaround. --- .github/workflows/release.yml | 2 ++ .github/workflows/test.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2315ab9230..6f2ca21677c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,6 +101,8 @@ jobs: run: | # Set a custom output root directory to avoid long file name issues. [System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'startup --output_user_root=C:/tmp') + [System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'build:windows --copt=/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR --host_copt=/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR') + choco upgrade llvm --version=17.0.6 - name: Configure download mirrors shell: bash run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 519af4da445..ca3fa47f12a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,6 +99,9 @@ jobs: # Set a custom output root directory to avoid long file name issues. run: | [System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'startup --output_user_root=C:/tmp') + # Work around https://github.com/actions/runner-images/issues/10004 + [System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'build:windows --copt=/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR --host_copt=/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR') + choco upgrade llvm --version=17.0.6 - name: Configure download mirrors shell: bash run: |