Skip to content

Commit 800f709

Browse files
committed
Add cpp tests to CI build
1 parent 8faa948 commit 800f709

File tree

3 files changed

+283
-95
lines changed

3 files changed

+283
-95
lines changed

.github/workflows/CI.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- pull_request
66

77
jobs:
8-
test:
8+
test-py:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
@@ -24,6 +24,34 @@ jobs:
2424
- name: Test with tox
2525
run: tox
2626

27+
test-cpp:
28+
runs-on: ubuntu-22.04
29+
strategy:
30+
matrix:
31+
cxx:
32+
- g++-10
33+
# - clang++-14 <- need to adjust -fcoroutines flag in Makefiles
34+
35+
steps:
36+
- run: |
37+
sudo apt update
38+
sudo apt install -y g++-10 clang-14
39+
- uses: actions/checkout@v1
40+
with:
41+
submodules: recursive
42+
- name: Set up Python 3.7
43+
uses: actions/setup-python@v2
44+
with:
45+
python-version: 3.7
46+
- name: Install dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
python -m pip install -r requirements_dev.txt
50+
- name: Run tests
51+
run: make -C test_include
52+
env:
53+
CXX: ${{ matrix.cxx }}
54+
2755
coverage:
2856
runs-on: ubuntu-latest
2957
steps:
@@ -69,7 +97,7 @@ jobs:
6997
run: ./tidy/test_tidy.sh
7098

7199
deploy:
72-
needs: [coverage, test, tidy]
100+
needs: [coverage, test-py, test-cpp, tidy]
73101
runs-on: ubuntu-latest
74102
if: startsWith(github.ref, 'refs/tags/v')
75103

requirements_dev.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ twine==1.14.0
88
watchdog==0.9.0
99
wheel==0.33.6
1010

11-
1211
anytree==2.8.0
1312
cppimport==22.8.2
1413
iterpop==0.3.4
@@ -19,6 +18,7 @@ lru-dict==1.1.7
1918
matplotlib==3.5.2
2019
mmh3==3.0.0
2120
mpmath==1.1.0
21+
numpy==1.21.6
2222
opytional==0.1.0
2323
pybind11[global]==2.10.0
2424
python-slugify==6.1.2
@@ -29,6 +29,7 @@ coverage==6.4.4
2929
scipy==1.5.4
3030
iterify==0.1.0
3131
more-itertools==8.13.0
32+
pandas==1.3.5
3233
pytest==7.1.2
3334
pytest-xdist==2.5.0
3435
safe-assert==0.2.0

0 commit comments

Comments
 (0)