Skip to content

Commit c4a685d

Browse files
committed
add test workflow
1 parent 13997d2 commit c4a685d

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/test.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: C++ Tests
2+
3+
on:
4+
push:
5+
paths:
6+
- 'cpp/**'
7+
- '.github/workflows/test.yaml'
8+
pull_request:
9+
paths:
10+
- 'cpp/**'
11+
- '.github/workflows/test.yaml'
12+
13+
jobs:
14+
build-and-test:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Install dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y cmake g++ make
25+
26+
- name: Build tests
27+
working-directory: cpp/tests
28+
run: |
29+
mkdir -p build
30+
cd build
31+
cmake ..
32+
make
33+
34+
- name: Run tests
35+
working-directory: cpp/tests/build
36+
run: |
37+
ctest --output-on-failure

0 commit comments

Comments
 (0)