diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index 15724ce5..41920480 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -35,6 +35,7 @@ jobs: with: toolchain: nightly profile: minimal + components: rust-src override: true - name: Generate Cargo.lock @@ -66,15 +67,9 @@ jobs: - name: 'Build TypeScript' run: yarn build - - name: Check build - uses: actions-rs/cargo@v1 - with: - command: check - args: --all --bins --examples --tests -vvv - - name: Unit tests with address sanitizer run: | - yarn build:test + yarn build:test:asan LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/9/libasan.so yarn test env: RUST_TARGET: x86_64-unknown-linux-gnu diff --git a/package.json b/package.json index 289f1af7..a982893b 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "build:bench": "yarn --cwd ./bench build", "build:memory": "yarn --cwd ./memory-testing build", "build:test": "yarn --cwd ./examples/napi-compat-mode build && yarn --cwd ./examples/napi build", + "build:test:asan": "yarn --cwd ./examples/napi-compat-mode build --cargo-flags='-Zbuild-std' && yarn --cwd ./examples/napi build --cargo-flags='-Zbuild-std'", "build:test:aarch64": "yarn --cwd ./examples/napi-compat-mode build-aarch64 && yarn --cwd ./examples/napi build-aarch64", "build:test:android": "yarn --cwd ./examples/napi-compat-mode build --target aarch64-linux-android && yarn --cwd ./examples/napi build --target aarch64-linux-android", "build:test:android:armv7": "yarn --cwd ./examples/napi-compat-mode build --target armv7-linux-androideabi && yarn --cwd ./examples/napi build --target armv7-linux-androideabi",