Write with chunks #135
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
| # SPDX-FileCopyrightText: (c) 2025 Trailblaze Software, all rights reserved | |
| # SPDX-License-Identifier: LGPL-2.1-or-later | |
| # | |
| # This library is free software; you can redistribute it and/or modify it under | |
| # the terms of the GNU Lesser General Public License as published by the Free | |
| # Software Foundation; version 2.1. | |
| # | |
| # This library is distributed in the hope that it will be useful, but WITHOUT | |
| # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
| # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | |
| # details. | |
| # | |
| # For LGPL2 incompatible licensing or development requests, please contact | |
| # [email protected] | |
| name: Codecov | |
| on: | |
| push: | |
| branches: ["*"] | |
| pull_request: | |
| branches: ["*"] | |
| workflow_dispatch: | |
| jobs: | |
| codecov: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> \ | |
| "$GITHUB_OUTPUT" | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Coverage -S ${{ github.workspace }} | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Coverage -j 2 | |
| - name: Test | |
| working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
| run: ctest --build-config Coverage --output-on-failure | |
| - name: Coverage | |
| working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
| run: ctest --build-config Coverage -T Coverage | |
| - name: Install lcov | |
| run: sudo apt-get install lcov | |
| - name: lcov | |
| run: | | |
| lcov --capture --directory . --output-file coverage.info | |
| lcov --remove coverage.info '/usr/*' --output-file coverage.info | |
| lcov --list coverage.info | |
| - name: Upload coverage to codecov | |
| uses: codecov/codecov-action@5c93f7ab87f1aa9b956609bbc4b50a6e747fe2fb | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.info | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: true |