Skip to content

add clang CI check #201

add clang CI check

add clang CI check #201

# SPDX-FileCopyrightText: 2022 The dune-iga developers [email protected]
# SPDX-License-Identifier: CC0-1.0
name: CodeCoverage
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '.github/workflows/ghpages.yml'
- '.github/workflows/createDockerContainer.yml'
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
- '.github/workflows/ghpages.yml'
- '.github/workflows/createDockerContainer.yml'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
GCC-Debug-CodeCov:
runs-on: ubuntu-latest
container:
image: ikarusproject/ikarus-dev:latest
options: --memory-swap="20g" --memory="20g" --cpus="2"
steps:
- uses: actions/checkout@v2
- name: Build
run: |
mkdir cmake-build-debug
cd cmake-build-debug
cmake ../ -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DENABLE_TEST_COVERAGE=1
cmake --build . --parallel 2 --target _iga
cmake --build . --parallel 2 --target build_tests
- name: Tests
working-directory: ./cmake-build-debug
run: |
ctest --output-on-failure --parallel 2 -C Debug
cd ..
gcov -abcfu $(find ./cmake-build-debug -type f -name "*.gcno" | sed 's/gcno//g')
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: tests
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
gcov_ignore: ./cmake-build-debug/dune/iga/test/