-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (48 loc) · 1.78 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
54
55
56
57
58
name: Coverage
on:
push:
branches: "**"
pull_request:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
EXAMPLES: False
TESTS: True
COV: TRUE
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install boost
uses: MarkusJx/install-boost@v2.3.1
id: install-boost
with:
boost_version: 1.78.0
toolset: gcc
platform_version: 20.04
- name: "Setups GCC 10"
uses: egor-tensin/setup-gcc@v1
with:
version: 10
platform: x64
- name: Install lcov
shell: bash
run: sudo apt-get update; sudo apt-get install lcov
- name: Configures project
shell: bash
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DINCLUDE_EXAMPLES=${{env.EXAMPLES}} -DINCLUDE_TESTS=${{env.TESTS}} -DINCLUDE_COVERAGE=${{env.COV}} -DNUMCPP_NO_USE_BOOST:BOOL=True -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-10
- name: Build
shell: bash
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all -- -j 14
- name: Run Coverage
run: |
cd ${{github.workspace}}/build
make
make digneaTestCoverage
mkdir ${{github.workspace}}/coverage
lcov --remove digneaTestCoverage.info "/usr/*" "*/build/_deps/*" "*/examples/*" "*/lib/*" "*/test/" "*/algorithms/kp_heuristics/Combo*" "*/algorithms/kp_heuristics/ExpKnap*" "*/algorithms/kp_heuristics/MinKnap*" "*/utilities/PCA*" -o ${{github.workspace}}/coverage/lcov.info
- name: Send to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}