Add basic CI for Windows build#143
Conversation
krutkow
left a comment
There was a problem hiding this comment.
Thanks for adding Windows CI support! I left a few inline notes to align this with our project's security and performance standards.
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Developer Command Prompt | ||
| uses: ilammy/msvc-dev-cmd@v1 |
There was a problem hiding this comment.
We avoid third-party Actions. Official actions/ are permitted. Please remove the ilammy/msvc-dev-cmd step; CMake is generally able to detect the MSVC toolchain on windows-latest automatically.
| # 1. Manually install zlib using the built-in vcpkg executable | ||
| - name: Install zlib via vcpkg | ||
| run: | | ||
| vcpkg install zlib:x64-windows |
There was a problem hiding this comment.
Rather than building zlib with each run, try caching the vcpkg installed directories, or use vcpkg's native binary caching feature via GitHub Actions cache.
| -DUSE_CURL=OFF | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| -DVCPKG_TARGET_TRIPLET=x64-windows | ||
| -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" |
There was a problem hiding this comment.
Since this step uses PowerShell environment variable syntax ($env:), please explicitly add shell: powershell to this step, to be as explicit as possible in the workflow so it is self-documenting and resilient to future runner changes.
Added a basic build / test for Windows.
As you can see, there are a reasonable number of code warnings but they should be ok for now.
Let me know if anything else should be added.