| 1 | name: Windows builds (basic) |
| 2 | |
| 3 | on: [push, pull_request] |
| 4 | |
| 5 | jobs: |
| 6 | build: |
| 7 | name: ${{matrix.os}}, ${{matrix.std}}, ${{matrix.build_type}}, ${{matrix.platform}} |
| 8 | runs-on: ${{matrix.os}} |
| 9 | strategy: |
| 10 | matrix: |
| 11 | os: [windows-2019, windows-2022] |
| 12 | platform: [Win32, x64] |
| 13 | build_type: [Debug, Release] |
| 14 | std: [14, 17] |
| 15 | steps: |
| 16 | - uses: actions/checkout@v2 |
| 17 | |
| 18 | - name: Configure build |
| 19 | working-directory: ${{runner.workspace}} |
| 20 | run: | |
| 21 | cmake -S $Env:GITHUB_WORKSPACE ` |
| 22 | -B ${{runner.workspace}}/build ` |
| 23 | -DCMAKE_CXX_STANDARD=${{matrix.std}} ` |
| 24 | -A ${{matrix.platform}} ` |
| 25 | --preset all-tests |
| 26 | |
| 27 | - name: Build tests |
| 28 | working-directory: ${{runner.workspace}} |
| 29 | run: cmake --build build --config ${{matrix.build_type}} --parallel %NUMBER_OF_PROCESSORS% |
| 30 | shell: cmd |
| 31 | |
| 32 | - name: Run tests |
| 33 | working-directory: ${{runner.workspace}}/build |
| 34 | env: |
| 35 | CTEST_OUTPUT_ON_FAILURE: 1 |
| 36 | run: ctest -C ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS% |
| 37 | shell: cmd |