Skip to content

Commit 17cb116

Browse files
committed
add github ci action
1 parent de82494 commit 17cb116

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- name: tests
17+
asan: "OFF"
18+
tsan: "OFF"
19+
- name: asan
20+
asan: "ON"
21+
tsan: "OFF"
22+
- name: tsan
23+
asan: "OFF"
24+
tsan: "ON"
25+
26+
name: ${{ matrix.name }}
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
submodules: recursive
32+
33+
- name: Install system dependencies
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y cmake ninja-build
37+
38+
- uses: actions/setup-python@v5
39+
with:
40+
python-version: "3.x"
41+
42+
- name: Install Python packages
43+
run: pip install pybind11 numpy
44+
45+
- name: Configure
46+
run: |
47+
cmake --preset debug \
48+
-DBUILD_TESTS=ON \
49+
-DENABLE_ASAN=${{ matrix.asan }} \
50+
-DENABLE_TSAN=${{ matrix.tsan }} \
51+
-Dpybind11_DIR="$(python3 -m pybind11 --cmakedir)"
52+
53+
- name: Build
54+
run: cmake --build --preset debug
55+
56+
- name: Test
57+
run: ctest --test-dir build/debug --output-on-failure
58+
env:
59+
LSAN_OPTIONS: ${{ matrix.asan == 'ON' && format('suppressions={0}/lsan_supressions.txt', github.workspace) || '' }}

0 commit comments

Comments
 (0)