Skip to content

Commit 2af225f

Browse files
committed
ci: run with sanitizers
1 parent c732bd2 commit 2af225f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/check.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
uses: ./neqo/.github/actions/rust
6060
with:
6161
version: ${{ matrix.rust-toolchain }}
62-
components: rustfmt, clippy, llvm-tools-preview
62+
components: rustfmt, clippy, llvm-tools-preview${{ contains(matrix.rust-toolchain, 'nightly') && ', rust-src' || '' }}
6363
tools: cargo-llvm-cov, cargo-nextest, cargo-hack, cargo-machete
6464
token: ${{ secrets.GITHUB_TOKEN }}
6565

@@ -74,6 +74,14 @@ jobs:
7474
RUST_LOG=trace cargo +${{ matrix.rust-toolchain }} llvm-cov nextest $BUILD_TYPE --no-fail-fast --lcov --output-path lcov.info
7575
cargo +${{ matrix.rust-toolchain }} bench --no-run
7676
77+
- name: Run tests with sanitizers
78+
if: (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14') && matrix.rust-toolchain == 'nightly'
79+
run: |
80+
for sanitizer in address thread leak memory; do
81+
echo "Running tests with $sanitizer sanitizer..."
82+
RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly test -Z build-std --target x86_64-unknown-linux-gnu
83+
done
84+
7785
- name: Check formatting
7886
run: |
7987
if [ "${{ matrix.rust-toolchain }}" != "nightly" ]; then

0 commit comments

Comments
 (0)