Skip to content

Commit 5229cf4

Browse files
committed
Add Windows CI workflow
1 parent 3f6a47e commit 5229cf4

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
build-windows:
11+
runs-on: windows-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
compiler: [msvc, clang-cl]
16+
build: [header_only, static, shared]
17+
include:
18+
- build: header_only
19+
header_only: ON
20+
shared: OFF
21+
- build: static
22+
header_only: OFF
23+
shared: OFF
24+
- build: shared
25+
header_only: OFF
26+
shared: ON
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Configure
31+
run: |
32+
if ("${{ matrix.compiler }}" -eq "clang-cl") {
33+
cmake -S . -B build `
34+
-G "Visual Studio 17 2022" -A x64 -T ClangCL `
35+
-DWINSECRUNTIME_HEADER_ONLY=${{ matrix.header_only }} `
36+
-DWINSECRUNTIME_BUILD_SHARED=${{ matrix.shared }} `
37+
-DWINSECRUNTIME_BUILD_EXAMPLES=ON
38+
} else {
39+
cmake -S . -B build `
40+
-G "Visual Studio 17 2022" -A x64 `
41+
-DWINSECRUNTIME_HEADER_ONLY=${{ matrix.header_only }} `
42+
-DWINSECRUNTIME_BUILD_SHARED=${{ matrix.shared }} `
43+
-DWINSECRUNTIME_BUILD_EXAMPLES=ON
44+
}
45+
46+
- name: Build
47+
run: cmake --build build --config Release

0 commit comments

Comments
 (0)