-
-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (37 loc) · 1.15 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Windows
on:
push:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-2022]
platform: [Win32, x64]
build_type: [Debug, Release]
standard: [20]
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Create Environment
run: |
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
# bash shell for $GITHUB_WORKSPACE
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake -A ${{matrix.platform}} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_CXX_STANDARD=${{matrix.standard}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} $GITHUB_WORKSPACE
- name: Build
working-directory: ${{runner.workspace}}/build
run: |
$cpus = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
cmake --build . --config ${{matrix.build_type}} --parallel $cpus
- name: Test
working-directory: ${{runner.workspace}}/build
env:
CTEST_OUTPUT_ON_FAILURE: True
run: |
ctest -C ${{matrix.build_type}}