fix Ubuntu 24 coverage capture #168
This file contains hidden or 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: Ubuntu 22.04 | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - dev | |
| jobs: | |
| ci: | |
| name: ${{ matrix.compiler }}-${{ matrix.manager }} | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| env: | |
| cache-name: cache-${{ matrix.compiler }}-${{ matrix.manager }} | |
| strategy: | |
| fail-fast: false # Keep matrix jobs running so failures are easier to inspect | |
| matrix: | |
| include: | |
| - { compiler: gcc, manager: cmake } | |
| - { compiler: gcc, manager: conan } | |
| - { compiler: clang, manager: cmake } | |
| - { compiler: clang, manager: conan } | |
| steps: | |
| - uses: actions/checkout@v6.0.1 | |
| - uses: lukka/get-cmake@v4.2.0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6.1.0 | |
| if: matrix.manager == 'conan' | |
| with: | |
| python-version: '3.x' | |
| - name: Update apt | |
| run: | | |
| sudo apt-get update | |
| - name: Prepare cache directories | |
| run: | | |
| mkdir -p ~/.ccache ~/.conan2 install/github-actions-${{ matrix.manager }} | |
| - name: Setup caches | |
| id: h5pp-cache | |
| uses: actions/cache@v4.2.0 | |
| with: | |
| path: | | |
| ~/.ccache | |
| ~/.conan2 | |
| install/github-actions-${{ matrix.manager }} | |
| key: ${{ github.workflow }}-${{ env.cache-name }} | |
| - name: Setup gcc | |
| if: matrix.compiler == 'gcc' | |
| run: | | |
| sudo apt-get install gcc-12 g++-12 -y | |
| echo "FC=gfortran-12" >> $GITHUB_ENV | |
| echo "CC=gcc-12" >> $GITHUB_ENV | |
| echo "CXX=g++-12" >> $GITHUB_ENV | |
| - name: Setup clang | |
| if: matrix.compiler == 'clang' | |
| run: | | |
| sudo apt-get install clang-15 libomp-15-dev -y | |
| echo "FC=gfortran-12" >> $GITHUB_ENV | |
| echo "CC=clang-15" >> $GITHUB_ENV | |
| echo "CXX=clang++-15" >> $GITHUB_ENV | |
| - name: Setup build tools | |
| run: | | |
| sudo apt-get install ccache ninja-build gcovr lcov -y | |
| echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV | |
| - name: Setup conan | |
| if: matrix.manager == 'conan' | |
| run: | | |
| pip install conan | |
| conan profile detect --force | |
| - name: Run CMakePreset | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: 'github-actions-${{ matrix.manager }}' | |
| configurePresetAdditionalArgs: "['-DH5PP_ENABLE_COVERAGE=TRUE']" | |
| buildPreset: 'github-actions-${{ matrix.manager }}' | |
| testPreset: 'github-actions-${{ matrix.manager }}' |