add conditional variables testing #133
This file contains hidden or 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: run-tests | |
| on: | |
| push: | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| container: | |
| image: silkeh/clang:19 | |
| options: --user root | |
| steps: | |
| - name: Install deps | |
| run: apt update && apt install -y git ninja-build valgrind libboost-context-dev libgflags-dev libclang-19-dev | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Build | |
| run: | | |
| cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Debug | |
| cmake --build build --target lin_check_test | |
| - name: Run lin check test | |
| run: ./build/test/runtime/lin_check_test | |
| verifying-test-debug: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| container: | |
| image: silkeh/clang:19 | |
| options: --user root | |
| steps: | |
| - name: Install deps | |
| run: | | |
| apt update && apt install -y git ninja-build valgrind libgoogle-glog-dev libsnappy-dev protobuf-compiler libboost-context-dev pkg-config libcapstone-dev libclang-19-dev && \ | |
| git clone https://github.com/Kirillog/syscall_intercept.git && \ | |
| cmake syscall_intercept -G Ninja -B syscall_intercept/build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang && \ | |
| cmake --build syscall_intercept/build --target install | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Build | |
| run: | | |
| cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Debug | |
| cmake --build build --target verifying/targets/nonlinear_queue verifying/targets/nonlinear_ms_queue verifying/targets/nonlinear_treiber_stack verifying/targets/nonlinear_set verifying/blocking/nonlinear_mutex \ | |
| verifying/blocking/simple_mutex verifying/blocking/bank verifying/blocking/mutexed_register verifying/blocking/shared_mutexed_register verifying/blocking/buffered_channel | |
| - name: Run nonlinear_queue with random strategy | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_queue --rounds 10000 --strategy random | |
| - name: Run nonlinear_queue with pct strategy | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_queue --rounds 10000 --strategy pct | |
| - name: Run nonlinear_queue with random strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_queue --tasks 40 --rounds 100000 --strategy random --minimize | |
| - name: Run nonlinear_queue with pct strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_queue --tasks 40 --rounds 100000 --strategy pct --minimize | |
| - name: Run nonlinear_mutex with random strategy | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/blocking/nonlinear_mutex --strategy random --rounds 1000 | |
| - name: Run nonlinear_mutex with pct strategy | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/blocking/nonlinear_mutex --strategy pct --rounds 1000 | |
| - name: Run simple_mutex with random strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/simple_mutex --strategy random --rounds 100 | |
| - name: Run simple_mutex with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/simple_mutex --strategy pct --rounds 100 | |
| - name: Run bank with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/bank --strategy pct --rounds 100 | |
| - name: Run bank with random strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/bank --strategy random --rounds 100 | |
| - name: Run shared_mutexed_register with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/shared_mutexed_register --strategy pct --rounds 100 | |
| - name: Run shared_mutexed_register with random strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/shared_mutexed_register --strategy random --rounds 100 | |
| - name: Run mutexed_register with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/mutexed_register --strategy pct --rounds 100 | |
| - name: Run mutexed_register with random strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/mutexed_register --strategy random --rounds 100 | |
| - name: Run buffered_channel with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/buffered_channel --strategy pct --rounds 100 | |
| verifying-test-release: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| container: | |
| image: silkeh/clang:19 | |
| options: --user root | |
| steps: | |
| - name: Install deps | |
| run: | | |
| apt update && apt install -y git ninja-build valgrind libgoogle-glog-dev libsnappy-dev protobuf-compiler libboost-context-dev pkg-config libcapstone-dev libclang-19-dev && \ | |
| git clone https://github.com/Kirillog/syscall_intercept.git && \ | |
| cmake syscall_intercept -G Ninja -B syscall_intercept/build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang && \ | |
| cmake --build syscall_intercept/build --target install | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Build | |
| run: | | |
| cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build --target verifying/targets/nonlinear_queue verifying/targets/nonlinear_ms_queue verifying/targets/nonlinear_treiber_stack verifying/targets/nonlinear_set verifying/blocking/nonlinear_mutex \ | |
| verifying/blocking/simple_mutex verifying/blocking/bank verifying/blocking/mutexed_register verifying/blocking/shared_mutexed_register verifying/blocking/buffered_channel | |
| - name: Run nonlinear_queue with random strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_queue --tasks 40 --rounds 100000 --strategy random --minimize | |
| - name: Run nonlinear_queue with pct strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_queue --tasks 40 --rounds 100000 --strategy pct --minimize | |
| - name: Run nonlinear_ms_queue with random strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_ms_queue --tasks 40 --rounds 100000 --strategy random --minimize | |
| - name: Run nonlinear_ms_queue with pct strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_ms_queue --tasks 40 --rounds 100000 --strategy pct --minimize | |
| - name: Run nonlinear_treiber_stack with random strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_treiber_stack --tasks 40 --rounds 100000 --strategy random --minimize | |
| - name: Run nonlinear_treiber_stack with pct strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_treiber_stack --tasks 40 --rounds 100000 --strategy pct --minimize | |
| - name: Run nonlinear_set with random strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_set --tasks 40 --rounds 200000 --strategy random --minimize | |
| - name: Run nonlinear_set with pct strategy (minimization) | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/targets/nonlinear_set --tasks 40 --rounds 200000 --strategy pct --minimize | |
| - name: Run nonlinear_mutex with random strategy | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/blocking/nonlinear_mutex --strategy random --rounds 100000 --threads 4 | |
| - name: Run nonlinear_mutex with pct strategy | |
| run: | | |
| ./scripts/check.sh 3 ./build/verifying/blocking/nonlinear_mutex --strategy pct --rounds 100000 | |
| - name: Run simple_mutex with random strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/simple_mutex --strategy random --rounds 10000 | |
| - name: Run simple_mutex with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/simple_mutex --strategy pct --rounds 10000 | |
| - name: Run bank with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/bank --strategy pct --rounds 10000 | |
| - name: Run bank with random strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/bank --strategy random --rounds 10000 | |
| - name: Run shared_mutexed_register with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/shared_mutexed_register --strategy pct --rounds 10000 | |
| - name: Run shared_mutexed_register with random strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/shared_mutexed_register --strategy random --rounds 10000 | |
| - name: Run mutexed_register with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/mutexed_register --strategy pct --rounds 10000 | |
| - name: Run mutexed_register with random strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/mutexed_register --strategy random --rounds 10000 | |
| - name: Run buffered_channel with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/buffered_channel --strategy pct --rounds 10000 | |
| verifying-folly-release: | |
| runs-on: ubuntu-latest | |
| env: | |
| LTEST_BUILD_PATH: "/__w/LTest/LTest/build" | |
| defaults: | |
| run: | |
| shell: bash | |
| container: | |
| image: silkeh/clang:19 | |
| options: --user root | |
| steps: | |
| - name: Install deps | |
| run: | | |
| apt update && apt install -y git ninja-build valgrind libgoogle-glog-dev libsnappy-dev libclang-19-dev \ | |
| protobuf-compiler libboost-context-dev pkg-config libcapstone-dev \ | |
| libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev \ | |
| libdouble-conversion-dev libfast-float-dev libevent-dev libssl-dev libfmt-dev \ | |
| libgoogle-glog-dev zlib1g-dev && \ | |
| git clone --depth=1 https://github.com/Kirillog/syscall_intercept.git && \ | |
| cmake syscall_intercept -G Ninja -B syscall_intercept/build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang && \ | |
| cmake --build syscall_intercept/build --target install | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Build folly ltest dependencies | |
| run: | | |
| cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build --target plugin_pass runtime | |
| - name: Install folly | |
| run: | | |
| git clone --depth=1 https://github.com/Kirillog/folly.git && \ | |
| cmake folly -G Ninja -B folly/build_dir -DCMAKE_BUILD_TYPE=Release && \ | |
| cmake --build folly/build_dir --target install | |
| - name: Build tests | |
| run: | | |
| cmake --build build --target verifying/blocking/folly_rwspinlock verifying/blocking/folly_sharedmutex \ | |
| verifying/blocking/folly_flatcombining_queue | |
| - name: Run folly rwspinlock with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/folly_rwspinlock --strategy pct --rounds 10000 | |
| - name: Run folly shared_mutex with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/folly_sharedmutex --strategy pct --rounds 10000 | |
| - name: Run folly flatcombining queue with pct strategy | |
| run: | | |
| ./scripts/check.sh 0 ./build/verifying/blocking/folly_flatcombining_queue --strategy pct --rounds 10000 | |