Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/actions/locate-visual-studio/action.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/build-test-distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 1 addition & 17 deletions .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/matrix/windows-full-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/matrix/windows-minimal-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/matrix/windows-standard-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/pip-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,23 +356,31 @@ jobs:
needs: setup
if: ${{ inputs.disable_windows != true }}
timeout-minutes: 90
runs-on: [windows-2022]
runs-on: [windows-2025]
strategy:
fail-fast: false
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
env:
VCPKG_DEFAULT_TRIPLET: x64-windows-vs2022-meshlib
VCVARS_VER: '14.4'
PLATFORM_TOOLSET: v143
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
ref: ${{needs.setup.outputs.version_tag}}

- name: Locate Visual Studio
uses: ./.github/actions/locate-visual-studio

- name: Set up vcpkg
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'

Expand All @@ -397,13 +405,13 @@ 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

- 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
Expand All @@ -420,7 +428,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 -vcvars_ver=${{ env.VCVARS_VER }}
call ./scripts/mrbind/generate_win.bat -B --trace FOR_WHEEL=1

- name: Run Test
Expand Down Expand Up @@ -628,7 +636,11 @@ 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
matrix:
runner: [windows-2022, windows-2025]
steps:
- name: Checkout
uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-win-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading