Skip to content

Bump codecov/codecov-action from 3 to 4 #107

Bump codecov/codecov-action from 3 to 4

Bump codecov/codecov-action from 3 to 4 #107

Workflow file for this run

name: tests
on:
push:
pull_request:
jobs:
build:
name: ${{matrix.os}} ${{ matrix.description }} (C++ ${{ matrix.cppstd }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
# oldest LLVM that the install-llvm-action action is able to install
llvm-version: "5"
description: "LLVM 5"
cppstd: "11 14 17"
- os: ubuntu-20.04
# oldest GCC that the setup-gcc action is able to install
gcc-version: "7"
description: "GCC 7"
cppstd: "11 14"
- os: ubuntu-latest
gcc-version: "13"
description: "GCC 13"
cppstd: "11 14 17 20 23"
- os: ubuntu-latest
# default GCC, which has gcov
cppstd: "11 14 17 20 23"
- os: macos-latest
# uses Apple Clang
cppstd: "11 14 17 20 23"
- os: windows-latest
# uses MSVC
cppstd: "11 14 17 20 23"
steps:
- uses: actions/checkout@v4
- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
if: ${{ matrix.gcc-version != '' }}
with:
version: ${{ matrix.gcc-version }}
- name: Setup LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
if: ${{ matrix.llvm-version != '' }}
with:
version: ${{ matrix.llvm-version }}
env: true
- name: Build and Test
run: |
for cppstd in ${{ matrix.cppstd }}; do
echo ""
echo ""
echo "Testing C++${cppstd}"
BUILD="build-cpp${cppstd}"
cmake -S . -B $BUILD -DCMAKE_CXX_STANDARD=${cppstd} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON -DTASK_THREAD_POOL_TEST=ON -DTASK_THREAD_POOL_TEST_COVERAGE=ON -DTASK_THREAD_POOL_BENCH=ON
cmake --build $BUILD --config Debug
cd $BUILD/tests
ctest -C Debug --output-on-failure --verbose
cd ../..
done
shell: bash
- name: Upload Coverage to Codecov
if: contains(matrix.os, 'ubuntu')
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./include