From dce3aefcb5773be08398d6f94587647f4baff878 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 7 Jan 2025 14:04:23 +0100 Subject: [PATCH] Windows 2025 currently ships with Visual Studio 2022 --- .github/workflows/tests.yml | 4 ++-- .github/workflows/visual-studio.yml | 2 +- lib/find-visualstudio.js | 9 +++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7036246d9e..b02171e707 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -132,13 +132,13 @@ jobs: - name: Run Python Tests run: python -m pytest - name: Run Tests (macOS or Linux) - if: "!startsWith(matrix.os, 'windows')" + if: runner.os != 'Windows' shell: bash run: npm test --python="${pythonLocation}/python" env: FULL_TEST: ${{ (matrix.node == '22.x' && matrix.python == '3.13') && '1' || '0' }} - name: Run Tests (Windows) - if: startsWith(matrix.os, 'windows') + if: runner.os == 'Windows' shell: bash # Building wasm on Windows requires using make generator, it only works in bash run: npm run test --python="${pythonLocation}\\python.exe" env: diff --git a/.github/workflows/visual-studio.yml b/.github/workflows/visual-studio.yml index aff34374db..3412837422 100644 --- a/.github/workflows/visual-studio.yml +++ b/.github/workflows/visual-studio.yml @@ -22,7 +22,7 @@ jobs: - os: windows-2022 msvs-version: 2022 - os: windows-2025 - msvs-version: 2025 + msvs-version: 2022 # Fix this when Visual Studio 2025 is released runs-on: ${{ matrix.os }} steps: - name: Checkout Repository diff --git a/lib/find-visualstudio.js b/lib/find-visualstudio.js index 73f498daca..25c82c4066 100644 --- a/lib/find-visualstudio.js +++ b/lib/find-visualstudio.js @@ -385,14 +385,11 @@ class VisualStudioFinder { ret.versionYear = 2019 return ret } - if (ret.versionMajor === 17) { + // Fix this when Visual Studio 2025 ships + if ([17, 18].includes(ret.versionMajor)) { ret.versionYear = 2022 return ret } - if (ret.versionMajor === 18) { - ret.versionYear = 2025 - return ret - } this.log.silly('- unsupported version:', ret.versionMajor) return {} } @@ -461,7 +458,7 @@ class VisualStudioFinder { } else if (versionYear === 2022) { return 'v143' } else if (versionYear === 2025) { - return 'v144' + return 'v143' // Fix this when Visual Studio 2025 ships } this.log.silly('- invalid versionYear:', versionYear) return null