Removed old MinGW workaround #70
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 | |
- pull_request | |
env: | |
CMAKE_VERSION: 3.30.3 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: [ | |
{os: ubuntu-24.04, compiler_name: gcc, c_compiler: gcc-13, cxx_compiler: g++-13} | |
] | |
name: ${{matrix.config.os}} - ${{matrix.config.compiler_name}} - coverage | |
runs-on: ${{matrix.config.os}} | |
env: | |
CMAKE_GENERATOR: "Unix Makefiles" | |
CC: ${{matrix.config.c_compiler}} | |
CXX: ${{matrix.config.cxx_compiler}} | |
steps: | |
- name: Checkout dynamic_bitset | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
path: dynamic_bitset | |
- name: Setup CMake | |
id: cmake | |
uses: ./dynamic_bitset/.github/actions/setup_cmake | |
with: | |
cmake_version: ${{env.CMAKE_VERSION}} | |
used_env: ${{matrix.config.os}} | |
- name: CMake version | |
run: ${{steps.cmake.outputs.cmake_binary}} --version | |
- name: CTest version | |
run: ${{steps.cmake.outputs.ctest_binary}} --version | |
- name: Make version | |
run: make --version | |
- name: C compiler version | |
run: ${CC} --version | |
- name: C++ compiler version | |
run: ${CXX} --version | |
- name: Configure | |
run: >- | |
${{steps.cmake.outputs.cmake_binary}} | |
-S "${{github.workspace}}/dynamic_bitset" | |
-B "${{github.workspace}}/dynamic_bitset/build" | |
-D CMAKE_CONFIGURATION_TYPES=Release | |
-D CMAKE_BUILD_TYPE=Release | |
-D DYNAMICBITSET_ENABLE_COVERAGE=ON | |
- name: Build | |
run: >- | |
${{steps.cmake.outputs.cmake_binary}} | |
--build "${{github.workspace}}/dynamic_bitset/build" | |
--config Release | |
--parallel $(nproc) | |
- name: Run tests | |
run: >- | |
${{steps.cmake.outputs.ctest_binary}} | |
--test-dir "${{github.workspace}}/dynamic_bitset/build" | |
--output-on-failure | |
--parallel $(nproc) | |
- name: Generate coverage report | |
run: | | |
sudo apt install lcov | |
lcov --ignore-errors mismatch --directory "${{github.workspace}}/dynamic_bitset/build" --capture --output-file "${{github.workspace}}/coverage.info" | |
lcov --extract "${{github.workspace}}/coverage.info" "*/dynamic_bitset.hpp" --output-file "${{github.workspace}}/coverage.info" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
file: ${{github.workspace}}/coverage.info | |
root_dir: ${{github.workspace}}/dynamic_bitset | |
token: ${{ secrets.CODECOV_TOKEN }} | |
plugin: noop | |
plugins: noop | |
verbose: true |