60
60
TILEDB_ARROW_TESTS : ${{ matrix.TILEDB_ARROW_TESTS }}
61
61
TILEDB_WEBP : ${{ matrix.TILEDB_WEBP }}
62
62
TILEDB_CMAKE_BUILD_TYPE : ' Release'
63
+ # On windows-2019 we are using the Visual Studio generator, which is multi-config and places the build artifacts in a subdirectory
64
+ CONFIG_PATH_FIXUP : ${{ matrix.os == 'windows-2019' && 'Release' || '' }}
63
65
VCPKG_BINARY_SOURCES : ' clear;x-gha,readwrite'
64
66
steps :
67
+ # By default Visual Studio chooses the earliest installed toolset version
68
+ # for the main build and vcpkg chooses the latest. Force it to use the
69
+ # latest (14.39 currently).
70
+ - name : Setup MSVC toolset (VS 2022)
71
+ uses : TheMrMilchmann/setup-msvc-dev@v3
72
+ if : matrix.os == 'windows-2022'
73
+ with :
74
+ arch : x64
75
+ toolset : 14.39
76
+ - name : Install Ninja (VS 2022)
77
+ uses : seanmiddleditch/gha-setup-ninja@v4
78
+ if : matrix.os == 'windows-2022'
65
79
- name : ' tiledb env prep'
66
80
run : |
67
81
$env:BUILD_BUILDDIRECTORY = $env:GITHUB_WORKSPACE.replace("TileDB\TileDB","tdbbd") # 't'ile'db' 'b'uild 'd'ir
@@ -141,7 +155,7 @@ jobs:
141
155
# allow double-checking path
142
156
cmd /c "echo $PATH"
143
157
144
- $bootstrapOptions = $env:TILEDB_BASE_BOOTSTRAP_OPTIONS
158
+ $bootstrapOptions = $env:TILEDB_BASE_BOOTSTRAP_OPTIONS + " -CMakeGenerator ${{ matrix.os == 'windows-2022' && 'Ninja' || '`"Visual Studio 16 2019`"' }}"
145
159
if ($env:TILEDB_S3 -eq "ON") {
146
160
$bootstrapOptions = "-EnableS3 " + $bootstrapOptions
147
161
}
@@ -239,9 +253,7 @@ jobs:
239
253
}
240
254
241
255
# CMake exits with non-0 status if there are any warnings during the build, so
242
- cmake --build $env:BUILD_BUILDDIRECTORY\tiledb -j --target tiledb_unit --config $CMakeBuildType -- /verbosity:minimal
243
- cmake --build $env:BUILD_BUILDDIRECTORY\tiledb -j --target tiledb_regression --config $CMakeBuildType -- /verbosity:minimal
244
- cmake --build $env:BUILD_BUILDDIRECTORY\tiledb -j --target all_link_complete --config $CMakeBuildType -- /verbosity:minimal
256
+ cmake --build $env:BUILD_BUILDDIRECTORY\tiledb -j --target tiledb_unit unit_vfs tiledb_regression all_link_complete --config $CMakeBuildType
245
257
246
258
if ($env:TILEDB_AZURE -eq "ON") {
247
259
if($env.TILEDB_USE_CUSTOM_NODE_JS) {
@@ -272,15 +284,23 @@ jobs:
272
284
273
285
# Actually run tests
274
286
275
- $cmds = "$env:BUILD_BUILDDIRECTORY\tiledb\test\$CMakeBuildType \tiledb_unit.exe -d=yes"
287
+ $cmds = "$env:BUILD_BUILDDIRECTORY\tiledb\test\$env:CONFIG_PATH_FIXUP \tiledb_unit.exe -d=yes"
276
288
Write-Host "cmds: '$cmds'"
277
289
Invoke-Expression $cmds
278
290
if ($LastExitCode -ne 0) {
279
291
Write-Host "Tests failed. tiledb_unit exit status: " $LastExitCocde
280
292
$host.SetShouldExit($LastExitCode)
281
293
}
294
+
295
+ $cmds = "$env:BUILD_BUILDDIRECTORY\tiledb\tiledb\sm\filesystem\test\$env:CONFIG_PATH_FIXUP\unit_vfs -d=yes"
296
+ Write-Host "cmds: '$cmds'"
297
+ Invoke-Expression $cmds
298
+ if ($LastExitCode -ne 0) {
299
+ Write-Host "Tests failed. tiledb_vfs exit status: " $LastExitCocde
300
+ $host.SetShouldExit($LastExitCode)
301
+ }
282
302
283
- $cmds = "$env:BUILD_BUILDDIRECTORY\tiledb\test\ci\$CMakeBuildType \test_assert.exe -d=yes"
303
+ $cmds = "$env:BUILD_BUILDDIRECTORY\tiledb\test\ci\$env:CONFIG_PATH_FIXUP \test_assert.exe -d=yes"
284
304
Invoke-Expression $cmds
285
305
if ($LastExitCode -ne 0) {
286
306
Write-Host "Tests failed. test_assert exit status: " $LastExitCocde
@@ -302,7 +322,7 @@ jobs:
302
322
303
323
$TestAppDir = (Join-Path $env:BUILD_BUILDDIRECTORY "tiledb\examples\c_api")
304
324
$TestAppDataDir = (Join-Path $env:BUILD_BUILDDIRECTORY "tiledb\examples\c_api\test_app_data")
305
- Get-ChildItem (Join-Path $env:BUILD_BUILDDIRECTORY "tiledb\examples\c_api\$CMakeBuildType ") -Filter *.exe |
325
+ Get-ChildItem (Join-Path $env:BUILD_BUILDDIRECTORY "tiledb\examples\c_api\$env:CONFIG_PATH_FIXUP\ ") -Filter *.exe |
306
326
Foreach-Object {
307
327
try {
308
328
Set-Location -path $TestAppDir
@@ -335,7 +355,7 @@ jobs:
335
355
336
356
$TestAppDir = (Join-Path $env:BUILD_BUILDDIRECTORY "tiledb\examples\cpp_api")
337
357
$TestAppDataDir = (Join-Path $env:BUILD_BUILDDIRECTORY "tiledb\examples\cpp_api\test_app_data")
338
- Get-ChildItem (Join-Path $env:BUILD_BUILDDIRECTORY "tiledb\examples\cpp_api\$CMakeBuildType ") -Filter *.exe |
358
+ Get-ChildItem (Join-Path $env:BUILD_BUILDDIRECTORY "tiledb\examples\cpp_api\$env:CONFIG_PATH_FIXUP\ ") -Filter *.exe |
339
359
Foreach-Object {
340
360
try {
341
361
Set-Location -path $TestAppDir
@@ -380,12 +400,12 @@ jobs:
380
400
cd build
381
401
382
402
# Build zip artifact
383
- cmake -A X64 -DCMAKE_PREFIX_PATH="$env:BUILD_BUILDDIRECTORY\dist;$env:BUILD_BUILDDIRECTORY\vcpkg_installed\x64-windows" ..
403
+ cmake ${{ matrix.os != 'windows-2019' && '-G Ninja' || '' }} -DCMAKE_BUILD_TYPE="$CMakeBuildType" -DCMAKE_PREFIX_PATH="$env:BUILD_BUILDDIRECTORY\dist;$env:BUILD_BUILDDIRECTORY\vcpkg_installed\x64-windows" ..
384
404
385
405
cmake --build . --config $CMakeBuildType -v
386
406
387
- #.\$CMakeBuildType \ExampleExe.exe
388
- $cmd = ".\$CMakeBuildType \ExampleExe.exe"
407
+ #.\$env:CONFIG_PATH_FIXUP \ExampleExe.exe
408
+ $cmd = ".\$env:CONFIG_PATH_FIXUP \ExampleExe.exe"
389
409
Write-Host "cmd: '$cmd'"
390
410
Invoke-Expression $cmd
391
411
0 commit comments