ci: switch GCC build in GitLab pipeline to GCC 15 (from GCC 14) #95
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: Code coverage | |
| on: push | |
| jobs: | |
| coverage: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - version: 13 | |
| os: ubuntu-24.04 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| # Checks-out the repository under $GITHUB_WORKSPACE. | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: 'recursive' | |
| persist-credentials: false | |
| - name: Install Debian packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y catch2 cmake g++-${{ matrix.version }} libboost-dev libxml2-dev pkg-config zlib1g-dev | |
| sudo apt-get install -y lcov | |
| - name: Build with GNU GCC ${{ matrix.version }} | |
| run: | | |
| export CXX=g++-${{ matrix.version }} | |
| export CC=gcc-${{ matrix.version }} | |
| cd "$GITHUB_WORKSPACE" | |
| mkdir build-coverage | |
| cd build-coverage | |
| cmake ../ -DCODE_COVERAGE=ON | |
| make -j4 | |
| - name: Tests | |
| run: | | |
| cd "$GITHUB_WORKSPACE"/build-coverage | |
| ctest -V | |
| - name: Collect code coverage data | |
| run: | | |
| cd "$GITHUB_WORKSPACE"/build-coverage | |
| lcov -c --directory . --output-file coverage.info | |
| lcov --remove coverage.info '/usr/*' '*tests/*' '*libstriezel/*' -o main_coverage.info | |
| genhtml main_coverage.info --output-directory ../public | |
| - name: Upload code coverage data | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: pmdb_coverage | |
| path: ${{ github.workspace }}/public | |
| if-no-files-found: error |