@@ -10,34 +10,26 @@ jobs:
10
10
runs-on : ${{ matrix.os }}
11
11
strategy :
12
12
matrix :
13
- os : [windows-2019, windows-2022]
14
- platform : [Win32, x64]
15
- build_type : [Debug, Release]
16
- standard : [20]
13
+ os : [windows-latest]
14
+ flags : ["/std:c++11", "/std:c++latest"]
15
+ optimize : [/O2]
16
+
17
+ env :
18
+ CXXFLAGS : ${{ matrix.flags }} ${{ matrix.optimize }}
19
+ CTEST_OUTPUT_ON_FAILURE : 1
20
+ CTEST_NO_TESTS_ACTION : error
21
+ CTEST_PARALLEL_LEVEL : 0
22
+ CMAKE_BUILD_PARALLEL_LEVEL : 4
23
+
17
24
steps :
18
25
- name : Checkout
19
26
uses : actions/checkout@v4
20
27
21
- - name : Create Environment
22
- run : |
23
- cmake -E make_directory ${{runner.workspace}}/build
24
-
25
- - name : Configure
26
- # bash shell for $GITHUB_WORKSPACE
27
- shell : bash
28
- working-directory : ${{runner.workspace}}/build
29
- run : |
30
- cmake -A ${{matrix.platform}} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_CXX_STANDARD=${{matrix.standard}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} $GITHUB_WORKSPACE
28
+ - name : CMake configure
29
+ run : cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -B build
31
30
32
- - name : Build
33
- working-directory : ${{runner.workspace}}/build
34
- run : |
35
- $cpus = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
36
- cmake --build . --config ${{matrix.build_type}} --parallel $cpus
31
+ - name : CMake build
32
+ run : cmake --build build --config Release
37
33
38
- - name : Test
39
- working-directory : ${{runner.workspace}}/build
40
- env :
41
- CTEST_OUTPUT_ON_FAILURE : True
42
- run : |
43
- ctest -C ${{matrix.build_type}}
34
+ - name : CMake test
35
+ run : ctest --test-dir build -C Release
0 commit comments