Skip to content

Commit eace2c1

Browse files
committed
add github actions
1 parent 7b91d78 commit eace2c1

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/autotest.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build-and-test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
# - name: Set up Python
16+
# uses: actions/setup-python@v5
17+
# with:
18+
# python-version: '3.11'
19+
20+
- name: Install build dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y cmake g++ python3-dev pybind11-dev
24+
25+
- name: Configure with CMake
26+
run: cmake .
27+
28+
- name: Build with make
29+
run: make -j$(nproc)
30+
31+
- name: Run Python diff tests
32+
run: |
33+
python ./difftest/test.py | tee test_output.log
34+
35+
if sed 's/\x1b\[[0-9;]*m//g' test_output.log | grep -q "FAIL"; then
36+
echo "Detected FAIL in test output, marking CI as failed."
37+
exit 1
38+
else
39+
echo "All tests passed."
40+
fi

0 commit comments

Comments
 (0)