Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit dd961ed

Browse files
author
Nicolas Cornu
authored
Remove external sources from coverage (#484)
* Filter external directory from coverage * And split this tasks from the main workflow file
1 parent d0b1171 commit dd961ed

File tree

2 files changed

+46
-25
lines changed

2 files changed

+46
-25
lines changed

.github/workflows/coreneuron-ci.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -161,28 +161,3 @@ jobs:
161161
# BRANCH: gh-pages # The branch the action should deploy to.
162162
# FOLDER: ${{runner.workspace}}/nrn/build/docs # The folder the action should deploy.
163163
# CLEAN: false # Automatically remove deleted files from the deploy branch
164-
coverage:
165-
runs-on: ubuntu-16.04
166-
name: "Coverage Test"
167-
steps:
168-
- name: Install packages
169-
run: |
170-
sudo apt-get install doxygen bison flex libboost-all-dev libopenmpi-dev openmpi-bin python3-dev python3-pip lcov
171-
shell: bash
172-
- uses: actions/checkout@v2
173-
with:
174-
fetch-depth: 2
175-
- name: Build and Test for Coverage
176-
id: build-test
177-
shell: bash
178-
working-directory: ${{runner.workspace}}/CoreNeuron
179-
run: |
180-
mkdir build && cd build
181-
cmake .. -DCORENRN_ENABLE_MPI=ON -DCMAKE_C_FLAGS="-coverage -O0" -DCMAKE_CXX_FLAGS="-coverage -O0";
182-
make
183-
(cd ..; lcov --capture --initial --directory . --no-external --output-file build/coverage-base.info)
184-
make test
185-
(cd ..; lcov --capture --directory . --no-external --output-file build/coverage-run.info)
186-
lcov --add-tracefile coverage-base.info --add-tracefile coverage-run.info --output-file coverage-combined.info
187-
genhtml coverage-combined.info --output-directory coverage --demangle-cpp --ignore-errors source
188-
bash <(curl -s https://codecov.io/bash)

.github/workflows/coverage.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- live-debug*
8+
- release/**
9+
pull_request:
10+
branches:
11+
- master
12+
- release/**
13+
14+
env:
15+
BUILD_TYPE: Release
16+
DEFAULT_PY_VERSION: 3.8
17+
18+
jobs:
19+
coverage:
20+
runs-on: ubuntu-16.04
21+
name: "Coverage Test"
22+
steps:
23+
- name: Install packages
24+
run: |
25+
sudo apt-get install doxygen bison flex libboost-all-dev libopenmpi-dev openmpi-bin python3-dev python3-pip lcov
26+
shell: bash
27+
- uses: actions/checkout@v2
28+
with:
29+
fetch-depth: 2
30+
- name: Build and Test for Coverage
31+
id: build-test
32+
shell: bash
33+
working-directory: ${{runner.workspace}}/CoreNeuron
34+
run: |
35+
mkdir build && cd build
36+
cmake .. -DCORENRN_ENABLE_MPI=ON -DCMAKE_C_FLAGS="-coverage -O0" -DCMAKE_CXX_FLAGS="-coverage -O0";
37+
make -j2
38+
(cd ..; lcov --capture --initial --directory . --no-external --output-file build/coverage-base.info)
39+
make test
40+
(cd ..; lcov --capture --directory . --no-external --output-file build/coverage-run.info)
41+
lcov --add-tracefile coverage-base.info --add-tracefile coverage-run.info --output-file coverage-combined.info
42+
lcov --remove coverage-combined.info --output-file coverage.info "*/external/*"
43+
lcov --list coverage.info
44+
- name: Upload to codecov.io
45+
run: bash <(curl -s https://codecov.io/bash) -f build/coverage.info
46+

0 commit comments

Comments
 (0)