Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lockbud to CI #83

Merged
merged 13 commits into from
Jan 22, 2025
17 changes: 17 additions & 0 deletions .github/scripts/check_lockbud.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Run lockbud to check for deadlocks and capture the output
output=$(cargo lockbud -k deadlock -b -l tokio_util 2>&1)

# Check if lockbud returned any issues
if echo "$output" | grep -q '"bug_kind"'; then
# Print the JSON payload
echo "Lockbud detected issues:"
echo "$output"

# Exit with a non-zero status to indicate an error
exit 1
else
echo "No issues detected by Lockbud."
exit 0
fi
13 changes: 13 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,16 @@ jobs:
bins: cargo-sort, taplo-cli
- name: Run cargo sort to check if Cargo.toml files are sorted
run: make sort

lockbud:
name: lockbud
runs-on: ubuntu-latest
container:
image: sigmaprime/lockbud:latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: apt update && apt install -y cmake libclang-dev
- name: Check for deadlocks
run: .github/scripts/check_lockbud.sh
Loading