Skip to content

Commit aca2c89

Browse files
committed
ci: add cross-platform GitHub Actions build-and-test workflow
1 parent 83a0167 commit aca2c89

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
build-and-test:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- os: ubuntu-latest
18+
cmake_configure_args: >-
19+
-DUMESH_PORT=posix
20+
-DUMESH_BUILD_TESTS=ON
21+
-DCMAKE_BUILD_TYPE=Release
22+
cmake_build_args: --parallel
23+
ctest_args: --test-dir build --output-on-failure
24+
- os: windows-latest
25+
cmake_configure_args: >-
26+
-DUMESH_PORT=posix
27+
-DUMESH_BUILD_TESTS=ON
28+
cmake_build_args: --config Release --parallel
29+
ctest_args: --test-dir build -C Release --output-on-failure
30+
31+
runs-on: ${{ matrix.os }}
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
submodules: recursive
38+
39+
- name: Configure
40+
run: cmake -S . -B build ${{ matrix.cmake_configure_args }}
41+
42+
- name: Build
43+
run: cmake --build build ${{ matrix.cmake_build_args }}
44+
45+
- name: Test
46+
run: ctest ${{ matrix.ctest_args }}

0 commit comments

Comments
 (0)