feat: add clear_tasks()
#265
Workflow file for this run
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
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-gcc: | |
name: "gcc-${{ matrix.version }}" | |
runs-on: ${{ matrix.os }} | |
env: | |
CPP_STANDARD: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-latest] | |
version: [11] | |
include: | |
- os: ubuntu-latest | |
version: 12 | |
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 GCC | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: ${{matrix.version}} | |
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: build | |
run: cmake --build build -j4 | |
- name: test | |
run: | | |
cd build | |
ctest --build-config Debug | |
- name: Set up coverage tools | |
run: | | |
sudo apt-get install lcov gcovr -y | |
if: matrix.version == 11 && matrix.os == 'ubuntu-20.04' | |
- 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 | |
if: matrix.version == 11 && matrix.os == 'ubuntu-20.04' | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ${{github.workspace}}/build/test/CMakeFiles/thread-pool-tests.dir/coverage.info | |
if: matrix.version == 11 && matrix.os == 'ubuntu-20.04' | |
build-clang: | |
name: "clang-${{matrix.version}}" | |
runs-on: ubuntu-20.04 | |
env: | |
CPP_STANDARD: 20 | |
strategy: | |
fail-fast: false | |
max-parallel: 4 | |
matrix: | |
version: [14, 15, 16, 17, 18] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: "**/cpm_modules" | |
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} | |
# clang needs GCC | |
- name: set up GCC | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: 11 | |
platform: x64 | |
- name: Install libs | |
run: | | |
sudo apt-get update | |
sudo apt-get install build-essential -y | |
- name: Set up Clang | |
run: | | |
wget -O llvm.sh https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh ${{matrix.version}} | |
- 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-${{matrix.version}} | |
CXX: clang++-${{matrix.version}} | |
- name: build | |
run: cmake --build build-clang -j4 | |
- name: test clang | |
run: | | |
cd build-clang | |
ctest --build-config Debug |