From 4c1d5f344e691d6d314161960fa145aa37b2303b Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Sat, 30 May 2026 16:49:56 +0300 Subject: [PATCH 1/6] use windows-2025 github runners --- .github/workflows/build-test-distribute.yml | 2 +- .github/workflows/matrix/windows-full-config.json | 8 ++++---- .github/workflows/matrix/windows-minimal-config.json | 4 ++-- .github/workflows/matrix/windows-standard-config.json | 4 ++-- .github/workflows/pip-build.yml | 2 +- .github/workflows/test-distribution.yml | 2 +- .github/workflows/update-win-version.yml | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-test-distribute.yml b/.github/workflows/build-test-distribute.yml index a03f1077b32a..4317720ac32f 100644 --- a/.github/workflows/build-test-distribute.yml +++ b/.github/workflows/build-test-distribute.yml @@ -155,7 +155,7 @@ jobs: - linux-vcpkg-build-test - macos-build-test timeout-minutes: 20 - runs-on: windows-2022 + runs-on: windows-2025 steps: - name: Checkout uses: actions/checkout@v6 diff --git a/.github/workflows/matrix/windows-full-config.json b/.github/workflows/matrix/windows-full-config.json index 740384f4c64e..30ddf773b6e1 100644 --- a/.github/workflows/matrix/windows-full-config.json +++ b/.github/workflows/matrix/windows-full-config.json @@ -5,28 +5,28 @@ "config": "Debug", "build_system": "MSBuild", "vcpkg_triplet": "x64-windows-vs2022-meshlib", - "runner": ["windows-2022"] + "runner": ["windows-2025"] }, { "cxx_compiler": "msvc-2022", "config": "Release", "build_system": "MSBuild", "vcpkg_triplet": "x64-windows-vs2022-meshlib", - "runner": ["windows-2022"] + "runner": ["windows-2025"] }, { "cxx_compiler": "msvc-2022", "config": "Debug", "build_system": "CMake", "vcpkg_triplet": "x64-windows-vs2022-meshlib", - "runner": ["windows-2022"] + "runner": ["windows-2025"] }, { "cxx_compiler": "msvc-2022", "config": "Release", "build_system": "CMake", "vcpkg_triplet": "x64-windows-vs2022-meshlib", - "runner": ["windows-2022"] + "runner": ["windows-2025"] }, { "cxx_compiler": "msvc-2019", diff --git a/.github/workflows/matrix/windows-minimal-config.json b/.github/workflows/matrix/windows-minimal-config.json index fd7aae5f8777..15edeca49f03 100644 --- a/.github/workflows/matrix/windows-minimal-config.json +++ b/.github/workflows/matrix/windows-minimal-config.json @@ -12,14 +12,14 @@ "config": "Debug", "build_system": "MSBuild", "vcpkg_triplet": "x64-windows-vs2022-meshlib", - "runner": ["windows-2022"] + "runner": ["windows-2025"] }, { "cxx_compiler": "msvc-2022", "config": "Release", "build_system": "CMake", "vcpkg_triplet": "x64-windows-vs2022-meshlib", - "runner": ["windows-2022"] + "runner": ["windows-2025"] }, { "cxx_compiler": "msvc-2019", diff --git a/.github/workflows/matrix/windows-standard-config.json b/.github/workflows/matrix/windows-standard-config.json index 9b647c4a7804..ccbde557fbad 100644 --- a/.github/workflows/matrix/windows-standard-config.json +++ b/.github/workflows/matrix/windows-standard-config.json @@ -19,14 +19,14 @@ "config": "Release", "build_system": "MSBuild", "vcpkg_triplet": "x64-windows-vs2022-meshlib", - "runner": ["windows-2022"] + "runner": ["windows-2025"] }, { "cxx_compiler": "msvc-2022", "config": "Release", "build_system": "CMake", "vcpkg_triplet": "x64-windows-vs2022-meshlib", - "runner": ["windows-2022"] + "runner": ["windows-2025"] }, { "cxx_compiler": "msvc-2019", diff --git a/.github/workflows/pip-build.yml b/.github/workflows/pip-build.yml index 0685f3696cc2..88a02595d9c7 100644 --- a/.github/workflows/pip-build.yml +++ b/.github/workflows/pip-build.yml @@ -356,7 +356,7 @@ jobs: needs: setup if: ${{ inputs.disable_windows != true }} timeout-minutes: 90 - runs-on: [windows-2022] + runs-on: [windows-2025] strategy: fail-fast: false permissions: diff --git a/.github/workflows/test-distribution.yml b/.github/workflows/test-distribution.yml index 87f6d843ba82..7391d9d50ff3 100644 --- a/.github/workflows/test-distribution.yml +++ b/.github/workflows/test-distribution.yml @@ -313,7 +313,7 @@ jobs: windows-test: if: ${{ inputs.test_windows }} - runs-on: windows-2022 + runs-on: windows-2025 timeout-minutes: 30 strategy: fail-fast: false diff --git a/.github/workflows/update-win-version.yml b/.github/workflows/update-win-version.yml index 929908b0a0e2..bbc9f86191ce 100644 --- a/.github/workflows/update-win-version.yml +++ b/.github/workflows/update-win-version.yml @@ -13,7 +13,7 @@ on: jobs: update-win-version: timeout-minutes: 60 - runs-on: windows-2022 + runs-on: windows-2025 strategy: fail-fast: false matrix: From 0bb64d0d15d3866f84ea9f4cb3fc609d64f17440 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Sat, 30 May 2026 17:17:52 +0300 Subject: [PATCH 2/6] locate Visual Studio via vswhere in pip-build Resolve the VS install path at runtime instead of hardcoding the 2022 Enterprise path, which does not exist on windows-2025 runners. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/pip-build.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pip-build.yml b/.github/workflows/pip-build.yml index 88a02595d9c7..ec358b6a8b67 100644 --- a/.github/workflows/pip-build.yml +++ b/.github/workflows/pip-build.yml @@ -369,6 +369,25 @@ jobs: submodules: recursive ref: ${{needs.setup.outputs.version_tag}} + - name: Locate Visual Studio + # Resolve the VS install path at runtime via vswhere instead of + # hardcoding it. vswhere ships with the VS Installer at a fixed + # location. The result is exported as VC_PATH for later steps. + shell: pwsh + run: | + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + if (-not (Test-Path $vswhere)) { + Write-Error "vswhere.exe not found at $vswhere" + exit 1 + } + $vcPath = & $vswhere -latest -products * -property installationPath + if (-not $vcPath) { + Write-Error "Visual Studio installation not found via vswhere" + exit 1 + } + Write-Host "Found Visual Studio at: $vcPath" + "VC_PATH=$vcPath" | Out-File -FilePath $env:GITHUB_ENV -Append + - name: Set up vcpkg uses: ./.github/actions/setup-vcpkg-windows with: @@ -397,7 +416,7 @@ jobs: run: | $x = (dir $env:CUDA_PATH -dir -recurse -depth 2).where({$_.name -eq 'visual_studio_integration'}).fullname $y = (dir $x -dir -recurse).where({$_.name -eq 'MSBuildExtensions'}).fullname + '\*' - (gi 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\*\BuildCustomizations').fullname.foreach({cp $y $_}) + (gi '${{ env.VC_PATH }}\MSBuild\Microsoft\VC\*\BuildCustomizations').fullname.foreach({cp $y $_}) - name: Add msbuild to PATH uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0 @@ -420,7 +439,7 @@ jobs: env: MSYS2_DIR: C:\msys64 run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 + call "${{ env.VC_PATH }}\Common7\Tools\VsDevCmd.bat" -arch=amd64 call ./scripts/mrbind/generate_win.bat -B --trace FOR_WHEEL=1 - name: Run Test From 475c4af01d3a54e05f48097ddc2c9df929ce4665 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Sun, 31 May 2026 01:07:54 +0300 Subject: [PATCH 3/6] use x64-windows-vs2022-meshlib triplet in windows-pip-build Pin the VS2022 vcpkg triplet and the matching v143 toolset so the windows-2025 runner doesn't implicitly pick up a newer toolset. v143 keeps MRCudaVersion at 12.0 (source/platform.props) to match the installed CUDA 12.0 BuildCustomizations. The triplet is wired through vcpkg setup, the MSBuild build, and the MRBind generate step. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/pip-build.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pip-build.yml b/.github/workflows/pip-build.yml index ec358b6a8b67..749fdbaae6c1 100644 --- a/.github/workflows/pip-build.yml +++ b/.github/workflows/pip-build.yml @@ -362,6 +362,16 @@ jobs: permissions: id-token: write # This is required for requesting the JWT contents: read # This is required for actions/checkout + env: + # Pin the VS2022 vcpkg triplet and matching MSVC toolset. windows-2025 may + # default to a newer toolset, but v143 is what matches the CUDA 12.0 + # BuildCustomizations (MRCudaVersion in source/platform.props) and the + # x64-windows-vs2022-meshlib triplet's VCPKG_PLATFORM_TOOLSET. vcvars_ver + # 14.4 prefix-matches the installed 14.4x toolset dir; PlatformToolset is + # the stable MSBuild name. + VCPKG_DEFAULT_TRIPLET: x64-windows-vs2022-meshlib + VCVARS_VER: '14.4' + PLATFORM_TOOLSET: v143 steps: - name: Checkout uses: actions/checkout@v6 @@ -392,6 +402,7 @@ jobs: uses: ./.github/actions/setup-vcpkg-windows with: vcpkg-version: ${{ env.VCPKG-VERSION }} + vcpkg-triplet: ${{ env.VCPKG_DEFAULT_TRIPLET }} install-flags: '--write-s3' internal-build: 'true' @@ -422,7 +433,7 @@ jobs: uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0 - name: Build - run: msbuild -m source\MeshLib.sln -p:Configuration=Release + run: msbuild -m source\MeshLib.sln -p:Configuration=Release -p:VcpkgTriplet=${{ env.VCPKG_DEFAULT_TRIPLET }} -p:PlatformToolset=${{ env.PLATFORM_TOOLSET }} - name: Install MSYS2 for MRBind uses: ./.github/actions/install-msys2-mrbind @@ -439,7 +450,7 @@ jobs: env: MSYS2_DIR: C:\msys64 run: | - call "${{ env.VC_PATH }}\Common7\Tools\VsDevCmd.bat" -arch=amd64 + call "${{ env.VC_PATH }}\Common7\Tools\VsDevCmd.bat" -arch=amd64 -vcvars_ver=${{ env.VCVARS_VER }} call ./scripts/mrbind/generate_win.bat -B --trace FOR_WHEEL=1 - name: Run Test From 8792c33e59b9f5ccc665f7b7000ad6520be79c72 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Sun, 31 May 2026 01:15:20 +0300 Subject: [PATCH 4/6] extract Locate Visual Studio step into a reusable action The same vswhere-based VS lookup was duplicated in build-test-windows and pip-build. Move it to .github/actions/locate-visual-studio, which still exports VC_PATH for later steps and also exposes a `path` output. Co-Authored-By: Claude Opus 4.7 --- .../actions/locate-visual-studio/action.yml | 32 +++++++++++++++++++ .github/workflows/build-test-windows.yml | 18 +---------- .github/workflows/pip-build.yml | 18 +---------- 3 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 .github/actions/locate-visual-studio/action.yml diff --git a/.github/actions/locate-visual-studio/action.yml b/.github/actions/locate-visual-studio/action.yml new file mode 100644 index 000000000000..8d86e4d6bf77 --- /dev/null +++ b/.github/actions/locate-visual-studio/action.yml @@ -0,0 +1,32 @@ +name: 'Locate Visual Studio' +description: 'Resolve the Visual Studio install path at runtime via vswhere. Exports it as the VC_PATH environment variable (and a `path` output) for later steps.' + +outputs: + path: + description: 'Absolute path to the latest Visual Studio installation.' + value: ${{ steps.locate.outputs.path }} + +runs: + using: 'composite' + steps: + - name: Locate Visual Studio + id: locate + # Resolve the VS install path at runtime via vswhere instead of + # hardcoding an edition/year that may not exist on a given runner image. + # vswhere ships with the VS Installer at a fixed location. The result is + # exported as VC_PATH (env) and a `path` output for later steps. + shell: pwsh + run: | + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + if (-not (Test-Path $vswhere)) { + Write-Error "vswhere.exe not found at $vswhere" + exit 1 + } + $vcPath = & $vswhere -latest -products * -property installationPath + if (-not $vcPath) { + Write-Error "Visual Studio installation not found via vswhere" + exit 1 + } + Write-Host "Found Visual Studio at: $vcPath" + "VC_PATH=$vcPath" | Out-File -FilePath $env:GITHUB_ENV -Append + "path=$vcPath" | Out-File -FilePath $env:GITHUB_OUTPUT -Append diff --git a/.github/workflows/build-test-windows.yml b/.github/workflows/build-test-windows.yml index 4498d05586fe..28e4d614bc1c 100644 --- a/.github/workflows/build-test-windows.yml +++ b/.github/workflows/build-test-windows.yml @@ -65,23 +65,7 @@ jobs: uses: actions/checkout@v6 - name: Locate Visual Studio - # Resolve the VS install path at runtime via vswhere instead of - # hardcoding it in the matrix. vswhere ships with the VS Installer at a - # fixed location. The result is exported as VC_PATH for later steps. - shell: pwsh - run: | - $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" - if (-not (Test-Path $vswhere)) { - Write-Error "vswhere.exe not found at $vswhere" - exit 1 - } - $vcPath = & $vswhere -latest -products * -property installationPath - if (-not $vcPath) { - Write-Error "Visual Studio installation not found via vswhere" - exit 1 - } - Write-Host "Found Visual Studio at: $vcPath" - "VC_PATH=$vcPath" | Out-File -FilePath $env:GITHUB_ENV -Append + uses: ./.github/actions/locate-visual-studio - name: Checkout third-party submodules shell: bash diff --git a/.github/workflows/pip-build.yml b/.github/workflows/pip-build.yml index 749fdbaae6c1..7a51333a1197 100644 --- a/.github/workflows/pip-build.yml +++ b/.github/workflows/pip-build.yml @@ -380,23 +380,7 @@ jobs: ref: ${{needs.setup.outputs.version_tag}} - name: Locate Visual Studio - # Resolve the VS install path at runtime via vswhere instead of - # hardcoding it. vswhere ships with the VS Installer at a fixed - # location. The result is exported as VC_PATH for later steps. - shell: pwsh - run: | - $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" - if (-not (Test-Path $vswhere)) { - Write-Error "vswhere.exe not found at $vswhere" - exit 1 - } - $vcPath = & $vswhere -latest -products * -property installationPath - if (-not $vcPath) { - Write-Error "Visual Studio installation not found via vswhere" - exit 1 - } - Write-Host "Found Visual Studio at: $vcPath" - "VC_PATH=$vcPath" | Out-File -FilePath $env:GITHUB_ENV -Append + uses: ./.github/actions/locate-visual-studio - name: Set up vcpkg uses: ./.github/actions/setup-vcpkg-windows From 9cd1a5992cecab568090e0f417aa374a92f07d17 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Sun, 31 May 2026 01:22:52 +0300 Subject: [PATCH 5/6] run windows-pip-test on both windows-2022 and windows-2025 Replace the single windows-latest runner with a matrix of windows-2022 and windows-2025 so the wheel is exercised on both the image that built it and the previous one. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/pip-build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pip-build.yml b/.github/workflows/pip-build.yml index 7a51333a1197..d7977c0930ca 100644 --- a/.github/workflows/pip-build.yml +++ b/.github/workflows/pip-build.yml @@ -642,7 +642,14 @@ jobs: needs: [windows-pip-build] if: ${{ inputs.disable_windows != true }} timeout-minutes: 90 - runs-on: windows-latest + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + # Test the wheel on both the image that built it (windows-2025) and the + # previous one (windows-2022) to catch wheels that only run on a fresh + # hosted image. + matrix: + runner: [windows-2022, windows-2025] steps: - name: Checkout uses: actions/checkout@v6 From 214a8f66a62060aee6bb3267c6e5cd508d0d786e Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Sun, 31 May 2026 10:39:32 +0300 Subject: [PATCH 6/6] remove excess comments --- .github/workflows/pip-build.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/pip-build.yml b/.github/workflows/pip-build.yml index d7977c0930ca..8d2c4bb74de8 100644 --- a/.github/workflows/pip-build.yml +++ b/.github/workflows/pip-build.yml @@ -363,12 +363,6 @@ jobs: id-token: write # This is required for requesting the JWT contents: read # This is required for actions/checkout env: - # Pin the VS2022 vcpkg triplet and matching MSVC toolset. windows-2025 may - # default to a newer toolset, but v143 is what matches the CUDA 12.0 - # BuildCustomizations (MRCudaVersion in source/platform.props) and the - # x64-windows-vs2022-meshlib triplet's VCPKG_PLATFORM_TOOLSET. vcvars_ver - # 14.4 prefix-matches the installed 14.4x toolset dir; PlatformToolset is - # the stable MSBuild name. VCPKG_DEFAULT_TRIPLET: x64-windows-vs2022-meshlib VCVARS_VER: '14.4' PLATFORM_TOOLSET: v143 @@ -645,9 +639,6 @@ jobs: runs-on: ${{ matrix.runner }} strategy: fail-fast: false - # Test the wheel on both the image that built it (windows-2025) and the - # previous one (windows-2022) to catch wheels that only run on a fresh - # hosted image. matrix: runner: [windows-2022, windows-2025] steps: