File tree Expand file tree Collapse file tree 2 files changed +57
-2
lines changed Expand file tree Collapse file tree 2 files changed +57
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Coverage
2
+
3
+ on :
4
+ push :
5
+ branches : [ master, coverage ]
6
+ paths-ignore : ' **.md'
7
+ pull_request :
8
+ branches : [ master, coverage ]
9
+ paths-ignore : ' **.md'
10
+
11
+ # Allows you to run this workflow manually from the Actions tab
12
+ workflow_dispatch :
13
+
14
+ jobs :
15
+ coverage :
16
+ runs-on : ubuntu-22.04
17
+
18
+ steps :
19
+ - uses : actions/checkout@v2
20
+ with :
21
+ token : ${{ secrets.GH_PAT }}
22
+ submodules : recursive
23
+
24
+ - name : Install Dependencies
25
+ run : |
26
+ sudo apt-get -y update
27
+ 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
28
+ pip install -U setuptools pytest pytest-cov numpy scipy
29
+
30
+ - name : Build (C++)
31
+ run : |
32
+ mkdir build && cd build
33
+ cmake .. -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARKS=ON -DBUILD_WITH_TBB=ON -DBUILD_WITH_PCL=ON -DENABLE_COVERAGE=ON
34
+ make -j$(nproc)
35
+
36
+ - name : Test (C++)
37
+ run : |
38
+ cd build
39
+ ctest -j$(nproc)
40
+ make coverage
41
+
42
+ - name : Build (Python)
43
+ run : |
44
+ python3 setup.py build && python3 setup.py install --user
45
+
46
+ - name : Test (Python)
47
+ run : |
48
+ pytest src/example/basic_registration.py --cov=src --cov-report=xml
49
+
50
+ - name : Upload coverage reports to Codecov
51
+ uses : codecov/codecov-action@v4.0.1
52
+ with :
53
+ token : ${{ secrets.CODECOV_TOKEN }}
54
+ slug : koide3/small_gicp
55
+ files : build/coverage.info,coverage.xml
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ if(ENABLE_COVERAGE)
45
45
46
46
add_custom_target (coverage
47
47
COMMAND ${LCOV} --directory . --capture --output-file coverage.info
48
- COMMAND ${LCOV} --remove coverage.info -o filtered_coverage .info '/usr/*'
49
- COMMAND ${GENHTML} --demangle-cpp -o coverage filtered_coverage .info
48
+ COMMAND ${LCOV} --remove coverage.info -o coverage .info '/usr/*'
49
+ COMMAND ${GENHTML} --demangle-cpp -o coverage coverage .info
50
50
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
51
51
endif ()
52
52
You can’t perform that action at this time.
0 commit comments