File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 7171 run : >
7272 cd url
7373 && cargo check --target aarch64-unknown-none -v --no-default-features
74+ - name : Run tests with sanitizers
75+ if : (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest') && matrix.rust == 'nightly'
76+ env :
77+ RUST_LOG : trace
78+ ASAN_OPTIONS : detect_leaks=1:detect_stack_use_after_return=1
79+ run : |
80+ if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
81+ sudo apt-get install -y --no-install-recommends llvm
82+ TARGET="x86_64-unknown-linux-gnu"
83+ SANITIZERS="address thread leak memory"
84+ elif [ "${{ matrix.os }}" = "macos-latest" ]; then
85+ # llvm-symbolizer (as part of llvm) is installed by default on macOS runners
86+ TARGET="aarch64-apple-darwin"
87+ # no memory and leak sanitizer support yet
88+ SANITIZERS="address thread"
89+ fi
90+ for sanitizer in $SANITIZERS; do
91+ echo "Running tests with $sanitizer sanitizer..."
92+ export RUSTFLAGS="-Z sanitizer=$sanitizer"
93+ export RUSTDOCFLAGS="$RUSTFLAGS"
94+ cargo +nightly test -Z build-std --target "$TARGET"
95+ done
7496
7597 WASM :
7698 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments