Skip to content

Add GitHub Actions CI to run CMake build on Linux and Windows#1

Open
gycog wants to merge 1 commit intomainfrom
codex/enable-action-feature-in-project
Open

Add GitHub Actions CI to run CMake build on Linux and Windows#1
gycog wants to merge 1 commit intomainfrom
codex/enable-action-feature-in-project

Conversation

@gycog
Copy link
Copy Markdown
Owner

@gycog gycog commented Apr 10, 2026

Motivation

  • Ensure the repository builds on both Linux and Windows for PRs and pushes to dev and main to catch build regressions early.

Description

  • Add .github/workflows/ci.yml which triggers on push, pull_request, and workflow_dispatch, sets contents: read permissions, and defines a matrix job for ubuntu-latest and windows-latest that checks out the repo with actions/checkout@v4 and runs CMake configure and build steps using cmake -S . -B build -DCMAKE_BUILD_TYPE=Release and cmake --build build --config Release, with Windows using PowerShell and the -G "NMake Makefiles" generator.

Testing

  • No automated tests were executed as part of this change; the new CI workflow will run the CMake configure and build steps on GitHub Actions for both Ubuntu and Windows when triggered.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant