diff --git a/github/workflows/asan.yml b/github/workflows/asan.yml new file mode 100644 index 0000000..08afae9 --- /dev/null +++ b/github/workflows/asan.yml @@ -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"