Add Windows (MSVC) build support and CI#1
Merged
Merged
Conversation
- config.w32: link the bundled clickhouse-cpp static libs; /DNOMINMAX so <windows.h> (pulled in by php.h) does not clobber clickhouse-cpp's std::max(). - ch_transport.cpp: Winsock branches under PHP_WIN32 (WSAGetLastError, ioctlsocket non-blocking, int recv/send length). - php_clickhouse_async.h: extern "C" on the module entry so a static build links (C++ TU vs the engine's C reference). - .github/workflows/build-windows.yml + scripts/windows: build clickhouse-cpp with MSVC, build PHP (ZTS) with async + clickhouse_async, then smoke-test. Excludes zstd's GAS asm file that MSVC cannot assemble (C fallback is used). Verified locally on VS 2022 (ZTS x64): full suite 50/50 pass against ClickHouse in Docker (1 TLS test skipped, no local TLS server).
- ci.yml + build-windows.yml: trigger only on push to main and PRs into main, so a pushed PR branch no longer runs each workflow twice (push + pull_request). - test_task.bat: drop EnableDelayedExpansion (it treated '!' in the inline PHP smoke code as delayed expansion and corrupted it) and run checks from smoke.php. - build-windows.yml: drop the on-failure artifact step (its C:\obj paths sit outside the workspace and broke upload-artifact). The Windows build itself passed on the runner; only the smoke step was broken.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verified locally on VS 2022 (ZTS x64): full suite 50/50 pass against ClickHouse in Docker (1 TLS test skipped, no local TLS server).