Reduce warnings from CMake (#334) #591
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
# This is a basic workflow that is manually triggered | |
name: Code Coverage | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
codacy-coverage-reporter: | |
runs-on: ubuntu-latest | |
name: codecov-coverage-reporter | |
steps: | |
#- name: Install gtest manually | |
# run: sudo apt-get install libgtest-dev | |
#- name: Install benchmark manually | |
# run: | | |
# git clone https://github.com/google/benchmark.git | |
# git clone https://github.com/google/googletest.git benchmark/googletest | |
# cd benchmark | |
# cmake -E make_directory "build" | |
# cmake -E chdir "build" cmake -DCMAKE_BUILD_TYPE=Release ../ | |
# cmake --build "build" --config Release | |
# sudo cmake --build "build" --config Release --target install | |
- name: Update apt repo | |
run: sudo apt-get update | |
- name: Install tools manually | |
run: sudo apt-get install lcov gcovr | |
- uses: actions/checkout@v3 | |
- name: Configure CMake | |
run: cmake -DTEST=ON -DCODE_COVERAGE=ON -B ${{github.workspace}}/build; sudo apt-get install lcov gcovr | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build | |
- name: run | |
working-directory: ${{github.workspace}}/build/test | |
run: ./test_exe | |
- name: create Report | |
working-directory: ${{github.workspace}}/build/test | |
run: lcov --capture --directory .. --output-file coverage.info | |
- uses: codecov/[email protected] | |
with: | |
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
file: ${{github.workspace}}/build/test/coverage.info # optional | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: true # optional (default = false) |