-
Notifications
You must be signed in to change notification settings - Fork 3
Add MSVC 2026 (Visual Studio 2026) and MinGW workflow support #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
…dling Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
|
@copilot 改一下代码以及git 提交、 workflow、PR 描述等等 里面出现的 vs2025 的字样 |
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
已修复所有 VS2025 引用,改为 VS2026。同时添加了 MinGW-w64 workflow:
现在 Windows workflow 包含三个 job:
Commit: 81b2777 |
|
@copilot 根据我们的上下文, 我知晓 vs2026 还未被 github 支持。 我认为未来某一天会被支持。 |
…available Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
已简化 VS2026 job:
输出示例(VS2026 不可用时): Commit: ba2341d |
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive Windows build support for Visual Studio 2026 and MinGW-w64 compilers to complement the existing VS2022 workflow. The VS2026 job includes intelligent detection that gracefully skips when the compiler isn't available on GitHub runners, ensuring forward compatibility when GitHub adds VS2026 support. The MinGW job provides an alternative GCC-based build option using MSYS2.
Key changes:
- Renamed the existing Windows build job to
build-vs2022and updated artifact naming to include the compiler version - Added
build-vs2026job with automatic version detection and graceful skip capability when VS2026 is not available - Added
build-mingwjob using MSYS2 with MinGW-w64 toolchain and Ninja build system - Updated documentation to reflect MSVC 2026 and MinGW-w64 support with CMake 3.31+ recommendation
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/windows-build.yml |
Split single Windows build job into three separate jobs (VS2022, VS2026, MinGW), added VS2026 detection logic, configured MinGW with MSYS2, updated artifact naming |
README.md |
Added MSVC 2026 and MinGW-w64 to compiler requirements, noted CMake 3.31+ recommendation for VS2026 |
README.zh-CN.md |
Chinese version of README updates - added MSVC 2026 and MinGW-w64 support documentation |
BUILD_AND_INSTALL.md |
Updated prerequisites to mention VS2026 and MinGW-w64, recommended CMake 3.31+ for MSVC 2026 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fi | ||
| cd scripts | ||
| if [ "${{ matrix.config }}" == "Debug" ]; then |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use = instead of == for string comparison in bash [ ] test construct to maintain consistency with the rest of the file (lines 60, 124, 309, 370) and follow POSIX standards. While == works in bash, it's a bashism and may not work in all shells.
| if [ "${{ matrix.config }}" == "Debug" ]; then | |
| if [ "${{ matrix.config }}" = "Debug" ]; then |
| try { | ||
| Write-Host "Attempting to use Visual Studio 18 2026 generator..." | ||
| cmake ../.. -G "Visual Studio 18 2026" -A x64 -DCCAP_BUILD_TESTS=ON $SHARED_FLAG | ||
| } catch { |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The try-catch block may not work as expected for the cmake command in PowerShell. External commands don't throw exceptions by default. Consider checking $LASTEXITCODE after the first cmake attempt instead of using try-catch, or set $ErrorActionPreference = 'Stop' before the try block to ensure cmake failures are caught.
| try { | |
| Write-Host "Attempting to use Visual Studio 18 2026 generator..." | |
| cmake ../.. -G "Visual Studio 18 2026" -A x64 -DCCAP_BUILD_TESTS=ON $SHARED_FLAG | |
| } catch { | |
| Write-Host "Attempting to use Visual Studio 18 2026 generator..." | |
| cmake ../.. -G "Visual Studio 18 2026" -A x64 -DCCAP_BUILD_TESTS=ON $SHARED_FLAG | |
| if ($LASTEXITCODE -ne 0) { |
| echo "✓ Windows shared library linking test with MinGW passed" | ||
| - name: Run Unit Tests | ||
| if: matrix.config == 'Release' |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MinGW job only runs unit tests for Release builds, while VS2022 and VS2026 jobs run tests for both Debug (functional tests) and Release (performance tests) builds. Consider adding tests for Debug builds to maintain consistency with the other Windows build jobs, or add a comment explaining why MinGW only tests Release builds.
| mkdir -p build | ||
| if [ ! -L "build/${{ matrix.config }}" ]; then | ||
| ln -sf "${{ matrix.config }}-${{ matrix.library_type }}" "build/${{ matrix.config }}" | ||
| fi |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MinGW test setup only creates a symbolic link for build/${{ matrix.config }} but not for build/tests/${{ matrix.config }}, unlike VS2022 and VS2026 jobs (lines 413-423). If the test script expects the tests directory structure, this could cause issues. Verify that ./run_tests.sh --functional --skip-build works correctly with MinGW's simplified symlink setup, or add the tests symlink for consistency.
| fi | |
| fi | |
| mkdir -p build/tests | |
| if [ ! -L "build/tests/${{ matrix.config }}" ]; then | |
| ln -sf "../../${{ matrix.config }}-${{ matrix.library_type }}" "build/tests/${{ matrix.config }}" | |
| fi |
Add MSVC 2026 (Visual Studio 2026) and MinGW Workflow Support
This PR adds comprehensive Windows build support with multiple compilers.
Changes
Workflow (.github/workflows/windows-build.yml)
build-vs2022job - Uses Visual Studio 2022 (stable)build-vs2026job - Uses Visual Studio 2026 (when available on GitHub runners)build-mingwjob - Uses MinGW-w64 with MSYS2 and Ninja build systemVS2026 Job Behavior
When VS2026 is available:
When VS2026 is not available:
MinGW Build Features
msys2/setup-msys2@v2action for MinGW-w64 toolchainmingw-w64-x86_64-toolchain,cmake,ninjalibccap.a(static) orlibccap.dll(shared)Documentation
Build Matrix
No breaking changes to existing VS 2022 builds.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.