This repository has been archived by the owner on Mar 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove external sources from coverage (#484)
* Filter external directory from coverage * And split this tasks from the main workflow file
- Loading branch information
Nicolas Cornu
authored
Apr 13, 2021
1 parent
d0b1171
commit dd961ed
Showing
2 changed files
with
46 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- live-debug* | ||
- release/** | ||
pull_request: | ||
branches: | ||
- master | ||
- release/** | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
DEFAULT_PY_VERSION: 3.8 | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-16.04 | ||
name: "Coverage Test" | ||
steps: | ||
- name: Install packages | ||
run: | | ||
sudo apt-get install doxygen bison flex libboost-all-dev libopenmpi-dev openmpi-bin python3-dev python3-pip lcov | ||
shell: bash | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
- name: Build and Test for Coverage | ||
id: build-test | ||
shell: bash | ||
working-directory: ${{runner.workspace}}/CoreNeuron | ||
run: | | ||
mkdir build && cd build | ||
cmake .. -DCORENRN_ENABLE_MPI=ON -DCMAKE_C_FLAGS="-coverage -O0" -DCMAKE_CXX_FLAGS="-coverage -O0"; | ||
make -j2 | ||
(cd ..; lcov --capture --initial --directory . --no-external --output-file build/coverage-base.info) | ||
make test | ||
(cd ..; lcov --capture --directory . --no-external --output-file build/coverage-run.info) | ||
lcov --add-tracefile coverage-base.info --add-tracefile coverage-run.info --output-file coverage-combined.info | ||
lcov --remove coverage-combined.info --output-file coverage.info "*/external/*" | ||
lcov --list coverage.info | ||
- name: Upload to codecov.io | ||
run: bash <(curl -s https://codecov.io/bash) -f build/coverage.info | ||
|