gupaxx/.github/workflows/lockbud.yml
Cyrix126 5230d46d93
Some checks are pending
CI / ci (macos-12) (push) Waiting to run
CI / ci (ubuntu-latest) (push) Waiting to run
Lockbud / lockbud (push) Waiting to run
Rust / fmt (push) Waiting to run
Rust / test (macos-latest) (push) Waiting to run
Rust / test (ubuntu-latest) (push) Waiting to run
Rust / typo (push) Waiting to run
Rust / clippy (macos-latest) (push) Waiting to run
Rust / clippy (ubuntu-latest) (push) Waiting to run
Rust / check (macos-latest) (push) Waiting to run
Rust / check (ubuntu-latest) (push) Waiting to run
Rust / doc (macos-latest) (push) Waiting to run
Rust / doc (ubuntu-latest) (push) Waiting to run
Typo / typo (push) Waiting to run
feat: add deadlock detection at CI
add [lockbud](https://github.com/BurtonQin/lockbud.git) for detection
**somes** deadlocks.

Need to remove the macros lock since lockbud would not be able to give
the right location with it.

The following command was used on the source code to reduce manual
modifications.
`
fd "*.rs" src/| xargs -I {} sd 'lock!\(([^\)]*)\)'
'$1.lock().unwrap()'{}
`
2024-10-10 18:48:24 +02:00

25 lines
565 B
YAML

name: Lockbud
on: push
jobs:
test:
name: lockbud
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate code coverage
run: |
git clone https://github.com/BurtonQin/lockbud.git
cd lockbud
cargo install --path .
cd ..
cargo clean
cargo lockbud -k deadlock -l gupaxx &> >(tee log.out)
if grep -q "WARN" log.out; then
echo "Lockbud warnings found:"
echo "$output"
exit 1
fi