Fix compilation issues with old clang++ and libc++ #647
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
# Copyright (c) 2020-2024 Morwenn | |
# SPDX-License-Identifier: MIT | |
name: Coverage Upload to Codecov | |
on: | |
push: | |
branches: | |
- 1.x.y-develop | |
- 1.x.y-stable | |
- 2.x.y-develop | |
paths: | |
- '.github/workflows/code-coverage.yml' | |
- '.github/.codecov.yml' | |
- 'CMakeLists.txt' | |
- 'cmake/**' | |
- 'include/**' | |
- 'tests/**' | |
jobs: | |
upload-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Install LCOV | |
run: sudo apt-get install -y lcov | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}} | |
run: > | |
cmake -H${{github.event.repository.name}} -Bbuild | |
-DCMAKE_BUILD_TYPE=Debug | |
-DCPPSORT_ENABLE_COVERAGE=ON | |
-G"Unix Makefiles" | |
- name: Build with coverage | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake --build . --config Debug -j 2 | |
- name: Run the test suite | |
shell: bash | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
working-directory: ${{runner.workspace}}/build | |
run: ctest -C Debug --no-tests=error | |
- name: Capture coverage info | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake --build . --target lcov-capture | |
- name: Upload coverage info | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ${{runner.workspace}}/build/lcov/data | |
files: '*.info' | |
fail_ci_if_error: true |