Add (only) ASAN workflow

This commit is contained in:
Jon Gjengset 2022-09-17 12:27:27 -07:00
parent 126c9a3a35
commit 11027d3f75

24
github/workflows/asan.yml Normal file
View file

@ -0,0 +1,24 @@
on:
push:
branches: [main]
pull_request:
name: Address sanitizer
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions/checkout@v2
- name: cargo test -Zsanitizer=address
uses: actions-rs/cargo@v1
with:
command: test
# only --lib --tests b/c of https://github.com/rust-lang/rust/issues/53945
args: --lib --tests --all-features --target x86_64-unknown-linux-gnu
env:
ASAN_OPTIONS: "detect_odr_violation=0:detect_leaks=0"
RUSTFLAGS: "-Z sanitizer=address"