Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding coverage #38

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
- name: cmake
run: cmake . -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