# # Copyright (c) 2019-2025 Ruben Perez Hidalgo (rubenperez038 at gmail dot com) # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # name: coverage on: push: branches: [develop, master] tags: ['*'] pull_request: workflow_dispatch: jobs: coverage: runs-on: ubuntu-latest container: image: ghcr.io/anarthal/cpp-ci-containers/build-gcc14:1 volumes: - /var/run/mysqld:/var/run/mysqld services: mysql: image: ghcr.io/anarthal/cpp-ci-containers/mysql-8_4_1:1 ports: - 3306:3306 volumes: - /var/run/mysqld:/var/run/mysqld steps: - name: Install coverage packages run: | DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends lcov - name: Fetch code uses: actions/checkout@v4 - name: Build code run: | python tools/ci/main.py \ --source-dir=$(pwd) \ b2 \ --server-host=mysql \ --toolset=gcc \ --cxxstd=20 \ --variant=debug \ --disable-local-sockets=off,on \ --coverage=1 - name: Generate coverage reports shell: bash run: | cd ~/boost-root/bin.v2 lcov \ --rc branch_coverage=0 \ --rc geninfo_unexecuted_blocks=1 \ --ignore-errors mismatch \ --gcov-tool gcov-14 \ --directory . \ --capture \ --output-file all.info lcov \ --rc branch_coverage=0 \ --output-file coverage.info \ --extract all.info '*/boost/mysql*' sed "s|^SF:$HOME/boost-root/|SF:include/|g" coverage.info > $GITHUB_WORKSPACE/coverage.info - name: Upload coverage reports uses: codecov/codecov-action@v4 with: verbose: true fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} plugins: noop # Don't run gcov again, codecov doesn't know about the filtering we perform file: coverage.info disable_search: true # Don't upload unwanted files disable_file_fixes: true # Default fixes make reports unusable