Add (only) LSAN workflow
This commit is contained in:
parent
f67cad0f91
commit
bf66d94f15
1 changed files with 32 additions and 0 deletions
32
github/workflows/lsan.yml
Normal file
32
github/workflows/lsan.yml
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
name: Leak sanitizer
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: |
|
||||||
|
# to get the symbolizer for debug symbol resolution
|
||||||
|
sudo apt install llvm
|
||||||
|
# to fix buggy leak analyzer:
|
||||||
|
# https://github.com/japaric/rust-san#unrealiable-leaksanitizer
|
||||||
|
sed -i '/\[features\]/i [profile.dev]' Cargo.toml
|
||||||
|
sed -i '/profile.dev/a opt-level = 1' Cargo.toml
|
||||||
|
cat Cargo.toml
|
||||||
|
name: Enable debug symbols
|
||||||
|
- name: cargo test -Zsanitizer=leak
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --all-features --target x86_64-unknown-linux-gnu
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "-Z sanitizer=leak"
|
||||||
|
LSAN_OPTIONS: "suppressions=lsan-suppressions.txt"
|
||||||
Loading…
Add table
Reference in a new issue