@@ -350,57 +350,88 @@ jobs:
350
350
working-directory : ./build
351
351
run : ctest --output-on-failure
352
352
353
- windows-msvc :
354
- name : ' Windows (Visual Studio)'
353
+ windows-msvc-msbuild :
354
+ name : Windows (MSVC MSBuild)
355
+ runs-on : windows-2022
356
+ steps :
357
+ - name : ' Check Out'
358
+ uses : actions/checkout@v4
359
+
360
+ # ccache not supported for this generator and/or Debug
361
+
362
+ - name : ' Build'
363
+ shell : cmd
364
+ run : |
365
+ md build
366
+ cd build
367
+ cmake --version
368
+ cmake ^
369
+ -G "Visual Studio 17 2022" ^
370
+ -D CMAKE_BUILD_TYPE=Debug ^
371
+ -D CMAKE_CXX_STANDARD=17 ^
372
+ -D BUILD_SHARED_LIBS=ON ^
373
+ ..
374
+ IF %ERRORLEVEL% NEQ 0 exit /B 1
375
+ cmake --build . --config Debug -j 4 -- /p:CL_MPcount=4
376
+
377
+ - name : ' Test'
378
+ working-directory : build
379
+ run : ctest --output-on-failure -C Debug
380
+
381
+ windows-msvc-ninja :
382
+ name : Windows (MSVC Ninja)
355
383
strategy :
356
384
fail-fast : false
357
385
matrix :
358
386
ci :
359
- - build_type : Debug
360
- cxxstd : 14
361
- os : windows-2022
362
- vcdir : C:\Program Files\Microsoft Visual Studio\2022\Enterprise
387
+ - os : windows-2019
388
+ cxxstd : 14
389
+ arch : x86
363
390
364
- - build_type : Release
365
- cxxstd : 14
366
- os : windows-2019
367
- vcdir : C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
391
+ - os : windows-2022
392
+ cxxstd : 20
393
+ arch : x64
368
394
369
395
runs-on : ${{ matrix.ci.os }}
370
396
steps :
397
+
371
398
- name : ' Check Out'
372
399
uses : actions/checkout@v4
373
400
374
- - name : ' Setup'
375
- run : choco install ccache ninja
376
-
377
401
- name : Retrieve build cache
378
402
id : restore-cache
379
403
uses : actions/cache/restore@v4
380
404
with :
381
405
path : .ccache
382
- key : windows-msvc-${{ matrix.ci.os}}-${{ matrix.ci.build_type}}-${{ github.ref_name }}-${{ github.run_id }}
383
- restore-keys : windows-msvc-${{ matrix.ci.os}}-${{ matrix.ci.build_type}}
406
+ key : msvc-ninja-${{ matrix.ci.os }}-${{ matrix.ci.cxxstd }}-${{ matrix.ci.arch }}-${{ github.ref_name }}-${{ github.run_id }}
407
+ restore-keys : msvc-ninja-${{ matrix.ci.os }}-${{ matrix.ci.cxxstd }}-${{ matrix.ci.arch }}
408
+
409
+ - name : ' Setup'
410
+ run : choco install ccache ninja
411
+
412
+ - name : Activate MSVC
413
+ uses : ilammy/msvc-dev-cmd@v1
414
+ with :
415
+ arch : ${{ matrix.ci.arch }}
384
416
385
417
- name : ' Build'
386
418
env :
387
419
CCACHE_DIR : ${{ github.workspace }}\.ccache
388
420
shell : cmd
389
421
run : |
390
- call "${{ matrix.ci.vcdir }}\VC\Auxiliary\Build\vcvars64.bat"
391
422
md build
392
423
cd build
393
424
cmake --version
394
425
cmake ^
395
426
-G Ninja ^
396
- -D CMAKE_BUILD_TYPE=${{ matrix.ci.build_type }} ^
427
+ -D CMAKE_BUILD_TYPE=Release ^
397
428
-D CMAKE_CXX_STANDARD=${{ matrix.ci.cxxstd }} ^
398
429
-D BUILD_SHARED_LIBS=ON ^
399
430
-D USE_CCACHE=ON ^
400
431
..
401
- IF %ERRORLEVEL% NEQ 0 exit
402
- cmake --build . --config ${{ matrix.ci.build_type }} -j 4
403
- IF %ERRORLEVEL% NEQ 0 exit
432
+ IF %ERRORLEVEL% NEQ 0 exit /B 1
433
+ cmake --build . --config Release -j 4
434
+ IF %ERRORLEVEL% NEQ 0 exit /B 1
404
435
ccache --show-stats --verbose
405
436
406
437
- name : Save build cache
@@ -411,7 +442,7 @@ jobs:
411
442
412
443
- name : ' Test'
413
444
working-directory : build
414
- run : ctest --output-on-failure -C ${{ matrix.ci.build_type }}
445
+ run : ctest --output-on-failure -C Release
415
446
416
447
macos :
417
448
name : ' macOS clang'
0 commit comments