-
Notifications
You must be signed in to change notification settings - Fork 15
57 lines (48 loc) · 1.21 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: C++ Python UnitTest CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set up CMake
run: |
sudo apt-get install -y cmake
pip install --upgrade pip
- name: Run cpp tests
run: |
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=`$pwd/`build -DENABLE_BUILD_WITH_GTEST=ON
cmake --build build
cd build
ctest -R
cd ../
rm -rf build
- name: Run python tests
run: |
pip install build==1.0.3
pip install wheel==0.37.1
pip install ninja==1.11.1.1
pip install setuptools==68.0.0
pip install pytest
python setup.py sdist bdist_wheel
ls dist
pip install --force-reinstall dist/*.whl
pip install -r test/py_test/requirements.txt
pytest test
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: build/Testing/Temporary