Skip to content

Update Windows CI and samples to Visual Studio 2026#174

Merged
SergioRZMasson merged 1 commit into
microsoft:masterfrom
SergioRZMasson:update-vs-2026
Jul 14, 2026
Merged

Update Windows CI and samples to Visual Studio 2026#174
SergioRZMasson merged 1 commit into
microsoft:masterfrom
SergioRZMasson:update-vs-2026

Conversation

@SergioRZMasson

@SergioRZMasson SergioRZMasson commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

The Windows CI is currently broken: GitHub's Windows runners no longer include
Visual Studio 2022, so the Visual Studio 17 2022 CMake generator fails to
configure with:

CMake Error at CMakeLists.txt:2 (project): Generator "Visual Studio 17 2022" could not find any instance of Visual Studio.

This moves the Windows build to Visual Studio 2026.

Changes

  • .github/workflows/windows.yml
    • Use the Visual Studio 18 2026 CMake generator (added in CMake 4.2).
    • Bump jwlawson/actions-setup-cmake to v2.2.0.
    • Set CMAKE_POLICY_VERSION_MINIMUM=3.5 for the Windows job (see Notes).
  • .github/workflows/ci.yml: pin the Windows CMake version to 4.2.7
    (macOS / iOS / Linux stay on 3.31.0).
  • External/RapidJSON/CMakeRapidJSONDownload.txt.in: bump
    cmake_minimum_required to 3.5.
  • GLTFSDK.Samples/CMakeLists.txt: build the samples as C++17.

Notes

  • CMake 4.x policy floor — CMake 4.0 removed compatibility with
    cmake_minimum_required(VERSION < 3.5). The vendored RapidJSON source
    (downloaded at configure time) still declares an older minimum, so the Windows
    job sets CMAKE_POLICY_VERSION_MINIMUM=3.5, which is inherited by the nested
    configure steps.
  • <experimental/filesystem> removal — the VS 2026 MSVC toolset removed
    <experimental/filesystem>, which the samples fell back to under C++14. The
    samples now compile as C++17 and use the standard <filesystem> header. The
    GLTFSDK library itself continues to target C++14.

Validation

Built locally with Visual Studio 2026 + CMake 4.2.7 for x64 and Win32 in
both RelWithDebInfo and Debug; all 345 unit tests pass in every
configuration. ARM64 uses the identical configuration (build-only in CI).

The CI Windows runners no longer provide Visual Studio 2022, so the
"Visual Studio 17 2022" CMake generator fails to configure. Move the
Windows build to Visual Studio 2026:

- windows.yml: use the "Visual Studio 18 2026" generator (requires
  CMake >= 4.2) and bump jwlawson/actions-setup-cmake to v2.2.0.
- ci.yml: pin the Windows CMake version to 4.2.7.
- Set CMAKE_POLICY_VERSION_MINIMUM=3.5 for the Windows job: CMake 4.x
  removed compatibility with cmake_minimum_required(VERSION < 3.5), and
  the vendored RapidJSON source (downloaded at configure time) still
  declares an older minimum. Also bump the RapidJSON download driver's
  own minimum to 3.5.
- Build the samples as C++17: the VS 2026 MSVC toolset removed
  <experimental/filesystem>, which the samples fell back to under
  C++14; they now use std::filesystem. The GLTFSDK library itself
  still targets C++14.

Validated locally with VS 2026 + CMake 4.2.7 for x64 and Win32
(RelWithDebInfo and Debug); all 345 unit tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 039828de-4db2-48f8-a5de-c9f7d33baffa
@SergioRZMasson
SergioRZMasson requested a review from bghgary July 14, 2026 19:11
@SergioRZMasson
SergioRZMasson merged commit cfe401c into microsoft:master Jul 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants