CI: add MSVC build and fix building with MSVC (#907)

Yess yessss let's continue supporting the worst compiler toolchain
😈

Fell out of the changes in #905

CI changes were claude because I cannot be arsed with yaml.

Can explain the individual code fixes if ya want any more context.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Will
2026-09-06 21:52:18 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 08e99dea4a
commit de466db29f
5 changed files with 48 additions and 12 deletions
+30 -1
View File
@@ -29,4 +29,33 @@ jobs:
with:
name: spice2x-ci-${{ env.COMMIT_SHORT_SHA }}
path: src/spice2x/bin
if-no-files-found: error
if-no-files-found: error
msvc-ci:
name: Build (MSVC ${{ matrix.arch }}-bit)
# windows-latest ships Visual Studio 2026; pin to the VS 2022 image, which is
# the toolset spice2x is actually developed against
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
include:
- arch: 32
platform: Win32
target: spicetools_spice spicetools_cfg
- arch: 64
platform: x64
target: spicetools_spice64
defaults:
run:
working-directory: ./src/spice2x
steps:
- uses: actions/checkout@v5
- name: Configure
run: >
cmake -S . -B cmake-build-msvc-${{ matrix.arch }}
-A ${{ matrix.platform }}
- name: Compile
run: >
cmake --build cmake-build-msvc-${{ matrix.arch }}
--config Release --target ${{ matrix.target }}