Merge pull request #120 from ckormanyos/adapt_codecov #134
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 Christopher Kormanyos 2022 - 2024. | |
# Distributed under the Boost Software License, | |
# Version 1.0. (See accompanying file LICENSE_1_0.txt | |
# or copy at http://www.boost.org/LICENSE_1_0.txt) | |
# ------------------------------------------------------------------------------ | |
name: soft_double_codecov | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
gnumake-gcc-gcov-native: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14 ] | |
compiler: [ g++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install lcov | |
- name: gnumake-gcc-gcov-native | |
run: | | |
cd .gcov/make | |
echo "build and run gcov/lcov/genhtml" | |
echo "make prepare -f make_gcov_01_generic.gmk MY_ALL_COV=0 MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}" | |
echo | |
make prepare -f make_gcov_01_generic.gmk MY_ALL_COV=0 MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }} | |
echo | |
echo "make gcov -f make_gcov_01_generic.gmk --jobs=8 MY_ALL_COV=0 MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}" | |
echo | |
make gcov -f make_gcov_01_generic.gmk --jobs=8 MY_ALL_COV=0 MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }} | |
echo | |
echo "return to soft_double root directory" | |
cd ../.. | |
- name: upload-codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
plugin: gcov | |
file: ${{ runner.workspace }}/soft_double/.gcov/make/coverage.info | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true |