Add GitHub Actions CI to run CMake build on Linux and Windows#1
Add GitHub Actions CI to run CMake build on Linux and Windows#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1f707796f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Configure (Windows) | ||
| if: runner.os == 'Windows' | ||
| shell: pwsh | ||
| run: cmake -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release |
There was a problem hiding this comment.
Initialize MSVC env before selecting NMake generator
The Windows configure step hard-codes -G "NMake Makefiles" but does not set up a Visual Studio developer environment first, so on windows-latest this can fail during configure when nmake/cl are not initialized in the shell. CMake’s generator docs note that command-line generators (including NMake) must be run from a prompt already configured for the chosen compiler/build tool, so this workflow can make the Windows matrix leg fail even when the project itself is healthy.
Useful? React with 👍 / 👎.
Motivation
devandmainto catch build regressions early.Description
.github/workflows/ci.ymlwhich triggers onpush,pull_request, andworkflow_dispatch, setscontents: readpermissions, and defines a matrix job forubuntu-latestandwindows-latestthat checks out the repo withactions/checkout@v4and runs CMake configure and build steps usingcmake -S . -B build -DCMAKE_BUILD_TYPE=Releaseandcmake --build build --config Release, with Windows using PowerShell and the-G "NMake Makefiles"generator.Testing
Codex Task