Skip to content

Commit 6b74c3d

Browse files
authored
Add GitHub Actions workflow for Windows build and test
1 parent cf41ccc commit 6b74c3d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build-test-windows-on-push
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-cmake-msvc:
7+
runs-on: windows-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
# - name: Add MSVC to PATH
12+
# uses: ilammy/msvc-dev-cmd@v1
13+
14+
# - name: Install CMake and Ninja
15+
# uses: lukka/get-cmake@v3.27.6
16+
# - name: Setup anew (or from cache) vcpkg (and does not build any package)
17+
# uses: lukka/run-vcpkg@v11
18+
19+
# - name: Run CMake consuming CMakePreset.json and run vcpkg to build packages
20+
# uses: lukka/run-cmake@v10
21+
22+
- name: Configure C/C++ with CMake
23+
run: |
24+
cmake -D CMAKE_BUILD_TYPE=Debug -D BUILD_TESTING=ON -D SWIG_PYTHON=OFF -S . -B build -G Ninja
25+
cmake --build build
26+
sudo cmake --install build
27+
28+
- name: Build with Ninja
29+
run: |
30+
cmake --build build
31+
cmake --install build
32+
33+
- name: Run tests
34+
run: cd build && ctest --output-on-failure

0 commit comments

Comments
 (0)