Specify MSVC architecture using presets

Shortens CI command lines slightly,
and documents the requirement.
This commit is contained in:
ISSOtm
2026-03-18 03:25:01 +01:00
committed by Eldred Habert
parent 5abebcf61f
commit 91fdfcd179
3 changed files with 21 additions and 6 deletions

View File

@@ -23,10 +23,8 @@ jobs:
include:
- bits: 32
arch: x86
platform: Win32
- bits: 64
arch: x86_x64
platform: x64
fail-fast: false
steps:
- name: Get version from tag
@@ -43,7 +41,7 @@ jobs:
# We instruct CMake to download and build third-party projects outside of our source tree,
# otherwise they can trigger `-Werror=dev` (from the `develop` preset).
run: |
cmake -S . -B build -A ${{ matrix.platform }} -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe
cmake -S . -B build --preset msvc${{ matrix.bits }} -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe
cmake --build build
cmake --install build --config Release --prefix install_dir --verbose
- name: Package binaries

View File

@@ -150,10 +150,8 @@ jobs:
include:
- bits: 32
arch: x86
platform: Win32
- bits: 64
arch: x86_x64
platform: x64
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
@@ -166,7 +164,7 @@ jobs:
# We instruct CMake to download and build third-party projects outside of our source tree,
# otherwise they can trigger `-Werror=dev` (from the `develop` preset).
run: | # ASan seems to be broken on Windows, so we disable it.
cmake -S . -B build -A ${{ matrix.platform }} --preset develop -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe -DSANITIZERS=OFF
cmake -S . -B build --preset develop-msvc${{ matrix.bits }} -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe -DSANITIZERS=OFF
cmake --build build
cmake --install build --config Debug --prefix install_dir --verbose
- name: Package binaries

View File

@@ -12,6 +12,25 @@
},
"warnings": { "uninitialized": true },
"errors": { "dev": true }
},
{
"name": "develop-msvc32",
"inherits": ["develop", "msvc32"]
},
{
"name": "develop-msvc64",
"inherits": ["develop", "msvc64"]
},
{
"name": "msvc32",
"description": "Flags for building 32-bit executables with MSVC",
"architecture": "Win32"
},
{
"name": "msvc64",
"description": "Flags for building 64-bit executables with MSVC",
"architecture": "x64"
}
]
}