Update CHANGELOG.md #425
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: CMake Codecov | |
on: [ push ] | |
env: | |
BUILD_TYPE: Debug | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: hendrikmuhs/ccache-action@v1.2 | |
- name: Install lcov | |
run: sudo apt-get install lcov -y | |
- name: Create Build Environment | |
run: | | |
cmake -E make_directory ${{github.workspace}}/build | |
cd build | |
- name: Configure CMake | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPHTREE_CODE_COVERAGE=ON | |
- name: Build | |
working-directory: ${{github.workspace}}/build | |
run: cmake --build . --config $BUILD_TYPE -j2 | |
- name: Run tests | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C $BUILD_TYPE | |
- name: Create and upload coverage | |
working-directory: ${{github.workspace}}/build | |
run: | | |
cd test/CMakeFiles/all_tests.dir/ | |
lcov --directory . --capture -o coverage.info | |
lcov -r coverage.info */build/* */test/* */c++/* */gtest/* -o coverageFiltered.info | |
lcov --list coverageFiltered.info | |
bash <(curl -s https://codecov.io/bash) -f coverageFiltered.info || echo "Upload failed" | |