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 7979 run : >
8080 cd url
8181 && cargo check --target aarch64-unknown-none -v --no-default-features
82+ - name : Run tests with sanitizers
83+ if : (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest') && matrix.rust == 'nightly'
84+ env :
85+ RUST_LOG : trace
86+ ASAN_OPTIONS : detect_leaks=1:detect_stack_use_after_return=1
87+ run : |
88+ if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
89+ sudo apt-get install -y --no-install-recommends llvm
90+ TARGET="x86_64-unknown-linux-gnu"
91+ SANITIZERS="address thread leak memory"
92+ elif [ "${{ matrix.os }}" = "macos-latest" ]; then
93+ # llvm-symbolizer (as part of llvm) is installed by default on macOS runners
94+ TARGET="aarch64-apple-darwin"
95+ # no memory and leak sanitizer support yet
96+ SANITIZERS="address thread"
97+ fi
98+ for sanitizer in $SANITIZERS; do
99+ echo "Running tests with $sanitizer sanitizer..."
100+ export RUSTFLAGS="-Z sanitizer=$sanitizer"
101+ export RUSTDOCFLAGS="$RUSTFLAGS"
102+ cargo +nightly test -Z build-std --target "$TARGET"
103+ done
82104
83105 WASM :
84106 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments