Skip to content

Commit

Permalink
Add coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Mar 19, 2024
1 parent 42e31db commit 1981f33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .ci_support/run_docker_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@
set -xe

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 -fno-inline --coverage" \
-DSWIG_COMPILE_FLAGS="-O1 -Wno-unused-parameter" \
-DSPHINX_FLAGS="-W -T -j4" \
/io
-B build /io
cd build
make install
make tests
ctest --output-on-failure --timeout 100 ${MAKEFLAGS}
lcov --no-external --capture --initial --directory $PWD --output-file lcov.info

uid=$1
gid=$2
if test -n "${uid}" -a -n "${gid}"
then
sudo cp -r ~/.local/share/doc/*/html /io
sudo chown -R ${uid}:${gid} /io/html
sudo cp -r ~/.local/share/doc/*/html lcov.info /io
sudo chown -R ${uid}:${gid} /io/html /io/lcov.info
fi
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
run: |
docker pull openturns/archlinux-module
docker run -e MAKEFLAGS='-j2' -v `pwd`:/io openturns/archlinux-module /io/.ci_support/run_docker_linux.sh `id -u` `id -g`
- uses: romeovs/lcov-reporter-action@v0.2.16
with:
lcov-file: ./lcov.info
- name: Upload
if: ${{ github.ref == 'refs/heads/master' }}
run: |
Expand Down

0 comments on commit 1981f33

Please sign in to comment.