Skip to content

Commit 7409a8c

Browse files
committed
Specify MSVC architecture using presets
Shortens CI command lines slightly, and documents the requirement.
1 parent 6a33a49 commit 7409a8c

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

.github/workflows/create-release-artifacts.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ jobs:
2323
include:
2424
- bits: 32
2525
arch: x86
26-
platform: Win32
2726
- bits: 64
2827
arch: x86_x64
29-
platform: x64
3028
fail-fast: false
3129
steps:
3230
- name: Get version from tag

.github/workflows/testing.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,8 @@ jobs:
151151
include:
152152
- bits: 32
153153
arch: x86
154-
platform: Win32
155154
- bits: 64
156155
arch: x86_x64
157-
platform: x64
158156
fail-fast: false
159157
runs-on: ${{ matrix.os }}
160158
steps:
@@ -167,7 +165,7 @@ jobs:
167165
# We instruct CMake to download and build third-party projects outside of our source tree,
168166
# otherwise they can trigger `-Werror=dev` (from the `develop` preset).
169167
run: | # ASan seems to be broken on Windows, so we disable it.
170-
cmake -S . -B build -A ${{ matrix.platform }} --preset develop -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe -DSANITIZERS=OFF
168+
cmake -S . -B build --preset develop-msvc${{ matrix.bits }} -DFETCHCONTENT_BASE_DIR="$TEMP/cmake-deps" -DBISON_EXECUTABLE=bison/win_bison.exe -DSANITIZERS=OFF
171169
cmake --build build
172170
cmake --install build --prefix install_dir --config Debug --verbose
173171
- name: Package binaries

CMakePresets.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@
1212
},
1313
"warnings": { "uninitialized": true },
1414
"errors": { "dev": true }
15+
},
16+
{
17+
"name": "develop-msvc32",
18+
"inherits": ["develop", "msvc32"]
19+
},
20+
{
21+
"name": "develop-msvc64",
22+
"inherits": ["develop", "msvc64"]
23+
},
24+
25+
{
26+
"name": "msvc32",
27+
"description": "Flags for building 32-bit executables with MSVC",
28+
"architecture": "Win32"
29+
},
30+
{
31+
"name": "msvc64",
32+
"description": "Flags for building 64-bit executables with MSVC",
33+
"architecture": "x64"
1534
}
1635
]
1736
}

0 commit comments

Comments
 (0)