Skip to content

Commit c97253a

Browse files
committed
Fix Windows GHA build
1 parent 928d3b2 commit c97253a

6 files changed

Lines changed: 73 additions & 7 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ jobs:
205205
- name: Configure CMake
206206
shell: cmd
207207
run: |
208-
copy CMakeUserPresets.json.windows.template CMakeUserPresets.json
208+
copy CMakeUserPresets.json.windows-vs2026.template CMakeUserPresets.json
209209
cmake --preset default
210210
211211
- name: Upload vcpkg failure logs

.github/workflows/pull-request.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ jobs:
196196
- name: Configure CMake
197197
shell: cmd
198198
run: |
199-
copy CMakeUserPresets.json.windows.template CMakeUserPresets.json
199+
copy CMakeUserPresets.json.windows-vs2026.template CMakeUserPresets.json
200200
cmake --preset default
201201
202202
- name: Upload vcpkg failure logs
@@ -215,8 +215,6 @@ jobs:
215215
- name: Run tests
216216
shell: cmd
217217
run: |
218-
set ISC_USER=sysdba
219-
set ISC_PASSWORD=masterkey
220218
ctest --preset default --output-on-failure -j8
221219
222220
build-macos:

CMakePresets.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@
5151
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
5252
"VCPKG_ROOT": "${sourceDir}/vcpkg"
5353
}
54+
},
55+
{
56+
"name": "windows-vs2026",
57+
"displayName": "Windows (Visual Studio 2026)",
58+
"description": "Multi-config build with the Visual Studio 18 2026 generator",
59+
"generator": "Visual Studio 18 2026",
60+
"architecture": {
61+
"value": "x64",
62+
"strategy": "external"
63+
},
64+
"binaryDir": "${sourceDir}/build",
65+
"cacheVariables": {
66+
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
67+
"VCPKG_ROOT": "${sourceDir}/vcpkg"
68+
}
5469
}
5570
],
5671
"buildPresets": [
@@ -71,6 +86,16 @@
7186
"name": "windows-vs2022-release",
7287
"configurePreset": "windows-vs2022",
7388
"configuration": "Release"
89+
},
90+
{
91+
"name": "windows-vs2026-debug",
92+
"configurePreset": "windows-vs2026",
93+
"configuration": "Debug"
94+
},
95+
{
96+
"name": "windows-vs2026-release",
97+
"configurePreset": "windows-vs2026",
98+
"configuration": "Release"
7499
}
75100
],
76101
"testPresets": [
@@ -91,6 +116,16 @@
91116
"name": "windows-vs2022-release",
92117
"configurePreset": "windows-vs2022",
93118
"configuration": "Release"
119+
},
120+
{
121+
"name": "windows-vs2026-debug",
122+
"configurePreset": "windows-vs2026",
123+
"configuration": "Debug"
124+
},
125+
{
126+
"name": "windows-vs2026-release",
127+
"configurePreset": "windows-vs2026",
128+
"configuration": "Release"
94129
}
95130
]
96131
}

CMakeUserPresets.json.windows.template renamed to CMakeUserPresets.json.windows-vs2022.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
],
2525
"environment": {
2626
"FBCPP_TEST_SERVER": "localhost",
27-
"ISC_USER": "sysdba",
28-
"ISC_PASSWORD": "masterkey"
27+
"ISC_USER": "sysdba",
28+
"ISC_PASSWORD": "masterkey"
2929
}
3030
}
3131
]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": 3,
3+
"configurePresets": [
4+
{
5+
"name": "default",
6+
"inherits": [
7+
"windows-vs2026"
8+
]
9+
}
10+
],
11+
"buildPresets": [
12+
{
13+
"name": "default",
14+
"inherits": [
15+
"windows-vs2026-debug"
16+
]
17+
}
18+
],
19+
"testPresets": [
20+
{
21+
"name": "default",
22+
"inherits": [
23+
"windows-vs2026-debug"
24+
],
25+
"environment": {
26+
"FBCPP_TEST_SERVER": "localhost",
27+
"ISC_USER": "sysdba",
28+
"ISC_PASSWORD": "masterkey"
29+
}
30+
}
31+
]
32+
}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ The default features are:
108108
This project uses CMake presets (`CMakePresets.json`) and vcpkg for dependency management.
109109

110110
Copy the appropriate `CMakeUserPresets.json.<platform>.template` file to `CMakeUserPresets.json` to set environment
111-
variables for tests and define the default preset.
111+
variables for tests and define the default preset. On Windows, use either `CMakeUserPresets.json.windows-vs2022.template`
112+
or `CMakeUserPresets.json.windows-vs2026.template`.
112113

113114
```bash
114115
# Configure

0 commit comments

Comments
 (0)