Skip to content

Coverage (#142)

Coverage (#142) #12

name: Linux Medium Build
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: [ "release", "debug" ]
use_cxx: [ "clang++-15", "g++-13" ]
use_cpp98: [ "OFF", "ON" ]
use_float: [ "OFF", "ON" ]
steps:
- uses: actions/checkout@v4
- name: Restore cmake dependencies
id: cache-restore-cmake-deps
uses: actions/cache/restore@v4
with:
path: |
build/_deps
key: ${{ runner.os }}-cmake-deps
- name: Building FuzzyLite
env:
CXX: ${{ matrix.use_cxx }}
run: |
cmake -B build/ -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DFL_CPP98=${{ matrix.use_cpp98 }} -DFL_USE_FLOAT=${{ matrix.use_float }} .
cmake --build build/ --parallel
ctest --test-dir build/
- name: Coverage
if: ${{ matrix.use_cxx == 'clang++-15' && matrix.build_type == 'release' && matrix.use_cpp98 == 'OFF' && matrix.use_float == 'OFF' }}
env:
CXX: "clang++-15"
GCOV: "llvm-cov-15 gcov"
run: |
echo '${{matrix}}'
cmake -B build/ -DFL_BUILD_COVERAGE=ON .
cmake --build build/ --parallel --target fl-test
ctest --test-dir build/
pip install gcovr
make coverage
- name: Coveralls
if: ${{ hashFiles('build/coveralls.json') != '' }}
uses: coverallsapp/github-action@v2
with:
file: build/coveralls.json