Merge pull request #149 from boostorg/144-implement-connection-usage-… #151
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: Coverage | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
posix: | |
defaults: | |
run: | |
shell: bash | |
runs-on: ubuntu-22.04 | |
env: | |
CXX: g++-11 | |
CXXFLAGS: -g -O0 -std=c++20 --coverage -fkeep-inline-functions -fkeep-static-functions | |
LDFLAGS: --coverage | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install CMake | |
run: sudo apt-get -y install cmake | |
- name: Install lcov | |
run: sudo apt-get -y install lcov | |
- name: Install compiler | |
run: sudo apt-get -y install g++-11 | |
- name: Install Redis | |
run: sudo apt-get -y install redis-server | |
- name: Install boost | |
uses: MarkusJx/[email protected] | |
id: install-boost | |
with: | |
boost_version: 1.81.0 | |
platform_version: 22.04 | |
- name: Run CMake | |
run: | | |
BOOST_ROOT=${{steps.install-boost.outputs.BOOST_ROOT}} cmake --preset coverage . | |
- name: Build | |
run: cmake --build --preset coverage | |
- name: Test | |
run: ctest --preset coverage | |
- name: Make the coverage file | |
run: cmake --build --preset coverage --target coverage | |
- name: Upload to codecov | |
run: | | |
bash <(curl -s https://codecov.io/bash) -f ./build/coverage/coverage.info || echo "Codecov did not collect coverage reports" | |