Skip to content

Commit

Permalink
Add CI test job using LLVM's Address Sanitizer (#891)
Browse files Browse the repository at this point in the history
* add CI test job using address sanitizer

* add rust-src Rust component
  • Loading branch information
Robbepop committed Jan 15, 2024
1 parent 28c770a commit e60da49
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,35 @@ jobs:
- name: Build (wasm32)
run: cargo build --workspace --lib --no-default-features --target wasm32-unknown-unknown --exclude wasmi_cli --exclude wasmi_wasi

test-asan:
name: Test (Address Sanitizer)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dtolnay/rust-toolchain@nightly
- name: Set up Cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/target/
key: ${{ runner.os }}-cargo-test-asan-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-test-asan-
- name: Checkout Submodules
run: git submodule update --init --recursive
- name: Show Rust Toolchain
run: rustup show
- name: "Add Rust Component: `rust-src`"
run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: Test
env:
RUSTFLAGS: "--cfg debug_assertions -Zsanitizer=address"
run: cargo test --workspace --tests -Zbuild-std --target x86_64-unknown-linux-gnu

test:
name: Test
strategy:
Expand Down

0 comments on commit e60da49

Please sign in to comment.