-
Notifications
You must be signed in to change notification settings - Fork 69
47 lines (36 loc) · 1.28 KB
/
cmake-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
44
45
46
47
name: CMake Windows
on:
push:
pull_request:
concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
permissions: read-all
jobs:
test_cmake-windows:
name: MSVC C++-17
runs-on: windows-2022
steps:
- uses: ilammy/msvc-dev-cmd@v1
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/mdspan-build
- name: Check Out
uses: actions/checkout@v2
with:
path: ${{github.workspace}}/mdspan-src
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/mdspan-build
run: cmake -DCMAKE_CXX_FLAGS=-EHsc $GITHUB_WORKSPACE/mdspan-src -DMDSPAN_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/mdspan-install -DMDSPAN_ENABLE_TESTS=ON -DMDSPAN_ENABLE_EXAMPLES=ON
- name: Build
shell: bash
working-directory: ${{github.workspace}}/mdspan-build
run: cmake --build . --parallel 4 --config Debug
- name: Test
working-directory: ${{github.workspace}}/mdspan-build
shell: bash
run: ctest --output-on-failure
- name: Install
shell: bash
working-directory: ${{github.workspace}}/mdspan-build
run: cmake --build . --target install