Skip to content

Merge branch 'main' of https://github.com/polyfem/polyfem #14

Merge branch 'main' of https://github.com/polyfem/polyfem

Merge branch 'main' of https://github.com/polyfem/polyfem #14

Workflow file for this run

name: Coverage
on:
push:
branches: [main]
pull_request:
env:
CTEST_OUTPUT_ON_FAILURE: ON
CTEST_PARALLEL_LEVEL: 2
jobs:
Linux:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
threading: [TBB]
include:
- os: ubuntu-22.04
name: Linux
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.6
with:
fetch-depth: 10
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get -o Acquire::Retries=3 install \
libblas-dev \
libglu1-mesa-dev \
xorg-dev \
lcov
- name: Configure
run: |
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_DEBUGNOSYMBOLS="" \
-DPOLYFEM_CODE_COVERAGE=ON \
-DPOLYFEM_THREADING=${{ matrix.threading }}
- name: Build
run: cd build; make -j2
- name: Run Coverage
run: |
cd build
ctest --verbose --output-on-failure
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' '*tests/*.cpp*' '*/polyfem/problem/*.cpp*' '*/polyfem/problem/*.hpp*' --output-file coverage.info
- name: Upload Coverage
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: polyfem # optional
files: coverage.info
name: polyfem # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)