Skip to content

Add thread initialization function to ctor #242

Add thread initialization function to ctor

Add thread initialization function to ctor #242

Workflow file for this run

name: Ubuntu
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
CTEST_OUTPUT_ON_FAILURE: 1
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
max-parallel: 4
env:
CPP_STANDARD: 20
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: 14
platform: x64
- name: set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 11
platform: x64
- name: configure gcc
run: cmake -S . -B build -DTP_BUILD_EXAMPLES=OFF -DTP_BUILD_BENCHMARKS=OFF -DTP_THREAD_SANITIZER=OFF -DCMAKE_BUILD_TYPE=Debug
- name: configure clang
run: cmake -S . -B build-clang -DTP_BUILD_EXAMPLES=OFF -DTP_BUILD_BENCHMARKS=OFF -DTP_THREAD_SANITIZER=OFF -DCMAKE_BUILD_TYPE=Debug
env:
CC: clang
CXX: clang++
- name: build
run: |
cmake --build build -j4
cmake --build build-clang -j4
- name: test
run: |
cd build
ctest --build-config Debug
- name: test clang
run: |
cd build-clang
ctest --build-config Debug
- name: Set up coverage tools
run: |
sudo apt-get install lcov gcovr -y
- name: Generate coverage report
working-directory: ${{github.workspace}}/build/test/CMakeFiles/thread-pool-tests.dir
run: |
lcov --directory . --capture --gcov gcov-11 --output-file coverage.info
lcov --remove coverage.info '*/test/*' --output-file coverage.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: ${{github.workspace}}/build/test/CMakeFiles/thread-pool-tests.dir/coverage.info