CI: build NeuralAudio with Ninja on Windows

cmake-rs 0.1.54 panics with "unsupported or unknown VisualStudio version: 18.0"
because the windows-latest runner now ships Visual Studio 18 (2026), which the
crate's VS-generator detection doesn't recognize.

Install Ninja and set CMAKE_GENERATOR=Ninja for the Windows build so the cmake
crate skips VS-version detection and drives cl.exe (from the active MSVC env)
directly. build.rs already searches the single-config (non-Release) output dirs,
so no linking changes are needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Skyler Lehmkuhl 2026-06-21 17:18:41 -04:00
parent 1cb821f05b
commit 149760e9c0
1 changed files with 9 additions and 1 deletions

View File

@ -88,7 +88,11 @@ jobs:
- name: Install dependencies (Windows) - name: Install dependencies (Windows)
if: matrix.platform == 'windows-latest' if: matrix.platform == 'windows-latest'
shell: pwsh shell: pwsh
run: choco install cmake llvm --installargs 'ADD_CMAKE_TO_PATH=System' -y run: |
choco install cmake llvm --installargs 'ADD_CMAKE_TO_PATH=System' -y
# Ninja: build NeuralAudio with it instead of a Visual Studio generator,
# so the cmake crate doesn't need to recognize the runner's VS version.
choco install ninja -y
# Activate the MSVC developer environment (runs vcvars) so the cmake crate # Activate the MSVC developer environment (runs vcvars) so the cmake crate
# building nam-ffi/NeuralAudio can determine the Visual Studio generator. # building nam-ffi/NeuralAudio can determine the Visual Studio generator.
@ -191,6 +195,10 @@ jobs:
shell: pwsh shell: pwsh
env: env:
FFMPEG_STATIC: "1" FFMPEG_STATIC: "1"
# Force Ninja for the cmake crate (nam-ffi/NeuralAudio): cmake-rs 0.1.54
# panics on "unknown VisualStudio version: 18.0" when it auto-detects the
# runner's VS generator. Ninja sidesteps that lookup entirely.
CMAKE_GENERATOR: Ninja
run: | run: |
cd lightningbeam-ui cd lightningbeam-ui
cargo build --release --bin lightningbeam-editor cargo build --release --bin lightningbeam-editor