Skip to content

Commit

Permalink
codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Mar 25, 2024
1 parent 9f3eab6 commit b74dc64
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .ci_support/run_docker_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ cd /tmp
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=~/.local \
-DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32 \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -D_GLIBCXX_ASSERTIONS" \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -D_GLIBCXX_ASSERTIONS --coverage" \
-DSWIG_COMPILE_FLAGS="-O1 -Wno-unused-parameter" \
-DSPHINX_FLAGS="-W -T -j4" \
/io
make install
make tests
ctest --output-on-failure --timeout 100 ${MAKEFLAGS}

# coverage
gcov `find lib/src/ -name "*.gcno"`
lcov --capture --directory ./lib/src/ -o coverage.info
lcov --remove coverage.info "/usr/include/*" -o coverage.info
genhtml coverage.info --output-directory ~/.local/share/doc/*/html/coverage
cp -v coverage.info ~/.local/share/doc/*/html/coverage

uid=$1
gid=$2
if test -n "${uid}" -a -n "${gid}"
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
git add -A .
git commit -a -m "GitHub Actions build ${GITHUB_REPOSITORY} ${GITHUB_RUN_ID}" || exit 0
git push --quiet origin master > /dev/null 2>&1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: openturns/otsvm
file: ./html/coverage/coverage.info
verbose: true

mingw:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.. image:: https://github.com/openturns/otsvm/actions/workflows/build.yml/badge.svg?branch=master
:target: https://github.com/openturns/otsvm/actions/workflows/build.yml

.. image:: https://codecov.io/gh/openturns/otsvm/graph/badge.svg?token=A7L8E5O0W2
:target: https://codecov.io/gh/openturns/otsvm

OTSVM Module
============

Expand Down
6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage:
status:
patch: false
project:
default:
threshold: 0.5%

0 comments on commit b74dc64

Please sign in to comment.