Skip to content

Commit

Permalink
Coverage (#142)
Browse files Browse the repository at this point in the history
* Coverage
* Coverage in workflows
  • Loading branch information
jcrada committed Mar 4, 2024
1 parent 38d93ca commit d4c879e
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 125 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/LinuxMediumBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,22 @@ jobs:
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
18 changes: 17 additions & 1 deletion .github/workflows/LinuxQuickBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
steps:
- uses: actions/checkout@v4

# - name: Linting FuzzyLite
# run: make lint

- name: Restore cmake dependencies
id: cache-restore-cmake-deps
uses: actions/cache/restore@v4
Expand All @@ -29,10 +32,23 @@ jobs:
env:
CXX: ${{ matrix.use_cxx }}
run: |
cmake -B build/ -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .
cmake -B build/ -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DFL_BUILD_COVERAGE=ON.
cmake --build build/ --parallel
ctest --test-dir build/
- name: Coverage
env:
GCOV: "llvm-cov-15 gcov"
run: |
pip install gcovr
make coverage
- name: Coveralls
if: ${{ hashFiles('build/coveralls.json') != '' }}
uses: coverallsapp/github-action@v2
with:
file: build/coveralls.json

- name: Save cmake dependencies
if: steps.cache-restore-cmake-deps.outputs.cache-hit != 'true'
id: cache-save-cmake-deps
Expand Down
Loading

0 comments on commit d4c879e

Please sign in to comment.