Add the full path to the conf file instead just to the folder. #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up CMake | |
run: sudo apt-get install cmake lcov | |
- name: Configure with CMake | |
run: | | |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_C_FLAGS="--coverage" \ | |
-DCMAKE_EXE_LINKER_FLAGS="--coverage" | |
- name: Build | |
run: cmake --build build | |
- name: Run Tests | |
run: ctest --test-dir build | |
- name: Capture Coverage Info | |
run: | | |
cd build | |
lcov --capture --directory . --output-file coverage.info | |
lcov --remove coverage.info '/usr/*' --output-file coverage.info # Remove coverage for system files. | |
lcov --remove coverage.info 'src/rstats/test/benchmark_rstats.c' --output-file coverage.info # Remove coverage for benchmarkrstats. | |
lcov --list coverage.info # Optional: Display coverage info | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: build/coverage.info | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
codecov_yml_path: .github/codecov.yml | |