Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure (Linux)
if: runner.os == 'Linux'
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

- name: Build (Linux)
if: runner.os == 'Linux'
run: cmake --build build --config Release

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


- name: Build (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: cmake --build build --config Release
Loading