84701ef879
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/cache](https://togithub.com/actions/cache) | action | major | `v3` -> `v4` | --- ### Release Notes <details> <summary>actions/cache (actions/cache)</summary> ### [`v4`](https://togithub.com/actions/cache/compare/v3...v4) [Compare Source](https://togithub.com/actions/cache/compare/v3...v4) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/napi-rs/napi-rs). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
name: Address Sanitizer
|
|
|
|
env:
|
|
DEBUG: 'napi:*'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
name: Address sanitizer
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
cache: 'yarn'
|
|
|
|
- name: Install
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: nightly
|
|
components: rust-src
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
key: nightly-ubuntu-node@18-cargo-cache
|
|
|
|
- name: 'Install dependencies'
|
|
run: yarn install --immutable --mode=skip-build
|
|
|
|
- name: Unit tests with address sanitizer
|
|
run: |
|
|
yarn workspace @examples/napi build -- -Z build-std
|
|
yarn workspace @examples/compat-mode build -- -Z build-std
|
|
LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/9/libasan.so yarn test
|
|
env:
|
|
RUST_TARGET: x86_64-unknown-linux-gnu
|
|
RUST_BACKTRACE: 1
|
|
RUSTFLAGS: -Z sanitizer=address
|
|
ASAN_OPTIONS: detect_leaks=0
|
|
|
|
- name: Clear the cargo caches
|
|
run: |
|
|
cargo install cargo-cache --no-default-features --features ci-autoclean
|
|
cargo-cache
|