name: Coverage on: pull_request: branches: - master - develop paths-ignore: - '.github/workflows/doc.yml' - '.github/workflows/fast.yml' - '.github/workflows/slow.yml' - 'doc/**' - 'examples/**' - '*.md' env: B2_OPTS: -q -j2 warnings-as-errors=on GCC_VERSION: 13 concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true jobs: cov: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Fetch Boost superproject run: | cd .. git clone -b $GITHUB_BASE_REF --depth 5 https://github.com/boostorg/boost.git cd boost mv -f $GITHUB_WORKSPACE/* libs/histogram git submodule update --init --depth 5 tools/build tools/boostdep python tools/boostdep/depinst/depinst.py --git_args "--depth 5 --jobs 3" histogram mv -f * $GITHUB_WORKSPACE - name: Prepare b2 run: ./bootstrap.sh - name: Test cxxstd=latest coverage=on run: | cd libs/histogram # don't compile examples in coverage build, coverage must come from tests alone ../../b2 $B2_OPTS toolset=gcc-${GCC_VERSION} cxxstd=latest coverage=on test//all - name: Process coverage data run: | cd libs/histogram GCOV=gcov-${GCC_VERSION} tools/cov.py - uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: libs/histogram/coverage.info