Skip to content

test(ffi): c header validation #904

test(ffi): c header validation

test(ffi): c header validation #904

Workflow file for this run

name: Sanitizer
on:
workflow_dispatch:
push:
branches:
- master
- 'v**-dev'
pull_request:
paths:
- 'key-wallet-ffi/**'
- 'dash-spv-ffi/**'
- 'dashcore/**'
- 'dashcore_hashes/**'
- 'key-wallet/**'
- 'dash-spv/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
asan:
name: Address Sanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-src
- name: Run tests with ASAN
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-Zsanitizer=address -Cdebuginfo=2 -Cforce-frame-pointers=yes"
ASAN_OPTIONS: "symbolize=1:allow_addr2line=1"
LSAN_OPTIONS: "fast_unwind_on_malloc=0"
SKIP_DASHD_TESTS: 1
run: |
# FFI crates (C interop)
cargo +nightly test -Zbuild-std --target x86_64-unknown-linux-gnu \
-p key-wallet-ffi -p dash-spv-ffi --lib --tests
# Core crypto crates (unsafe optimizations)
cargo +nightly test -Zbuild-std --target x86_64-unknown-linux-gnu \
-p dashcore -p dashcore_hashes --lib --tests
tsan:
name: Thread Sanitizer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-src
- name: Run tests with TSAN
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-Zsanitizer=thread -Cdebuginfo=2"
TSAN_OPTIONS: "second_deadlock_stack=1"
SKIP_DASHD_TESTS: 1
run: |
# Async crate with concurrent code
cargo +nightly test -Zbuild-std --target x86_64-unknown-linux-gnu \
-p dash-spv --lib --tests