Support detection of bthread mutex and FastMutex deadlock caused by double lock #1446
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: Build and Test on Linux | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ master ] | |
paths-ignore: | |
- '**.md' | |
env: | |
proc_num: $(nproc) | |
jobs: | |
clang-unittest: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/install-essential-dependences | |
- name: install gtest | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake libgtest-dev gdb | |
cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv lib/libgtest* /usr/lib/ | |
- uses: ./.github/actions/init-make-config | |
with: | |
options: --cc=clang --cxx=clang++ | |
- name: compile tests | |
run: | | |
cd test | |
make -j ${{env.proc_num}} bthread_mutex_unittest | |
- name: run tests | |
run: | | |
cd test | |
./bthread_mutex_unittest --gtest_filter=MutexTest.performance | |
clang-unittest1: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/install-essential-dependences | |
- name: install gtest | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake libgtest-dev gdb | |
cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv lib/libgtest* /usr/lib/ | |
- uses: ./.github/actions/init-make-config | |
with: | |
options: --cc=clang --cxx=clang++ | |
- name: compile tests | |
run: | | |
cd test | |
make CPPFLAGS="-DDEBUG_MUTEX1" -j ${{env.proc_num}} bthread_mutex_unittest | |
- name: run tests | |
run: | | |
cd test | |
./bthread_mutex_unittest --gtest_filter=MutexTest.performance |