-
Notifications
You must be signed in to change notification settings - Fork 52
53 lines (43 loc) · 1.44 KB
/
coverage.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
name: Coverage
on:
push:
branches: [ master, coverage ]
paths-ignore: '**.md'
pull_request:
branches: [ master, coverage ]
paths-ignore: '**.md'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
coverage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_PAT }}
submodules: recursive
- name: Install Dependencies
run: |
sudo apt-get -y update
sudo apt-get install -y build-essential cmake python3-pip pybind11-dev libeigen3-dev libfmt-dev libtbb-dev libomp-dev libpcl-dev libgtest-dev lcov
pip install -U setuptools pytest numpy scipy
- name: Build (C++)
run: |
mkdir build && cd build
cmake .. -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON -DBUILD_WITH_TBB=ON -DBUILD_WITH_PCL=ON -DENABLE_COVERAGE=ON
cmake --build . -j$(nproc)
- name: Test (C++)
run: |
ctest -j$(nproc)
- name: Build (Python)
run: |
cd ..
python3 setup.py build && python3 setup.py install --user
- name: Test (Python)
run: |
pytest src/example/basic_registration.py
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: koide3/small_gicp