@@ -2,7 +2,7 @@ name: CoreNEURON CI
22
33on :
44 push :
5- branches :
5+ branches :
66 - master
77 - live-debug*
88 - release/**
5959 run : |
6060 sudo apt-get install g++-${GCC_VERSION}
6161 shell : bash
62- env :
63- GCC_VERSION : ${{ matrix.config.gcc_version }}
62+ env :
63+ GCC_VERSION : ${{ matrix.config.gcc_version }}
6464
6565 - name : Set up Python3
6666 uses : actions/setup-python@v2
8888 if : ${{ matrix.config.use_nmodl == 'ON' || matrix.config.use_ispc == 'ON' }}
8989 run : |
9090 python3 -m pip install --upgrade pip jinja2 pyyaml pytest "sympy<1.6";
91-
91+
9292 - uses : actions/checkout@v2
9393
9494 - name : Install Python3 documentation dependencies
9797 run : |
9898 python3 -m pip install --upgrade pip
9999 python3 -m pip install --upgrade -r docs/docs_requirements.txt
100-
100+
101101 - name : Build and Test
102102 id : build-test
103103 shell : bash
@@ -124,7 +124,7 @@ jobs:
124124 fi
125125 make
126126 ctest --output-on-failure
127- make install
127+ make install
128128 env :
129129 cmake_option : ${{ matrix.config.cmake_option }}
130130 USE_ISPC : ${{ matrix.config.use_ispc }}
@@ -139,8 +139,7 @@ jobs:
139139 - name : live debug session on failure
140140 if : failure() && startsWith(github.ref, 'refs/heads/live-debug')
141141 uses : mxschmitt/action-tmate@v3
142-
143- - name : Documentation
142+ - name : Documentation
144143 if : ${{ startsWith(matrix.os, 'ubuntu') && matrix.config.documentation == 'ON' }}
145144 id : documentation
146145 working-directory : ${{runner.workspace}}/CoreNeuron
@@ -161,3 +160,28 @@ jobs:
161160# BRANCH: gh-pages # The branch the action should deploy to.
162161# FOLDER: ${{runner.workspace}}/nrn/build/docs # The folder the action should deploy.
163162# CLEAN: false # Automatically remove deleted files from the deploy branch
163+ coverage :
164+ runs-on : ubuntu-16.04
165+ name : " Coverage Test"
166+ steps :
167+ - name : Install packages
168+ run : |
169+ sudo apt-get install doxygen bison flex libboost-all-dev libopenmpi-dev openmpi-bin python3-dev python3-pip lcov
170+ shell : bash
171+ - uses : actions/checkout@v2
172+ with :
173+ fetch-depth : 2
174+ - name : Build and Test for Coverage
175+ id : build-test
176+ shell : bash
177+ working-directory : ${{runner.workspace}}/CoreNeuron
178+ run : |
179+ mkdir build && cd build
180+ cmake .. -DCORENRN_ENABLE_MPI=ON -DCMAKE_C_FLAGS="-coverage -O0" -DCMAKE_CXX_FLAGS="-coverage -O0";
181+ make
182+ (cd ..; lcov --capture --initial --directory . --no-external --output-file build/coverage-base.info)
183+ make test
184+ (cd ..; lcov --capture --directory . --no-external --output-file build/coverage-run.info)
185+ lcov --add-tracefile coverage-base.info --add-tracefile coverage-run.info --output-file coverage-combined.info
186+ genhtml coverage-combined.info --output-directory coverage --demangle-cpp --ignore-errors source
187+ bash <(curl -s https://codecov.io/bash)
0 commit comments