-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (33 loc) · 1015 Bytes
/
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
name: coverage
on: ["push", "pull_request"]
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
env:
BUILD_TYPE: Release
CC: gcc
CFLAGS: --coverage
CXX: g++
CXXFLAGS: --coverage
FC: gfortran
FCFLAGS: --coverage
steps:
- name: checkout
uses: actions/checkout@v1
- name: install dependencies
run: sudo apt-get install lcov libeigen3-dev
- name: cmake
run: cmake . -DBUILD_EXAMPLES=OFF -DENABLE_MATHEMATICA=OFF -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: cmake build
run: cmake --build . --config ${{ env.BUILD_TYPE }}
- name: ctest
run: ctest -T Test -T Coverage -C ${{ env.BUILD_TYPE }}
env:
CTEST_OUTPUT_ON_FAILURE: 1
- name: Lcov
run: lcov --directory . --capture --exclude '/usr/*' --exclude '*/test/*' --output-file=coverage.lcov
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage.lcov