-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (46 loc) · 1.13 KB
/
ci-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
48
49
50
51
52
53
name: ci-windows
on:
push:
tags-ignore:
- v*.*
branches:
- '*'
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
setup:
runs-on: windows-2022
outputs:
cache-hit: ${{ steps.cache-build.outputs.cache-hit }}
steps:
- name: Cache Build Files
id: cache-build
uses: actions/cache@v4
with:
path: build
key: ${{ runner.os }}-cmake-build
build-and-test:
runs-on: windows-2022
needs: setup
strategy:
fail-fast: false
matrix:
compiler: [ vs22 ]
cxx_version: [ 17, 20 ]
target: [ Debug, Release ]
steps:
- name: Harden Runner
uses: step-security/[email protected]
with:
egress-policy: audit
- uses: actions/checkout@v4
- name: Configure CMake
run: |
cmake -S . --preset=${{ matrix.compiler }} -B build -DCMAKE_CXX_STANDARD=${{ matrix.cxx_version }}
- name: Build
run: cmake --build build --config=${{ matrix.target }}
- name: Test
run: cd build && ctest -C ${{ matrix.target }} --output-on-failure