diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 30d5483..113ae90 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -59,7 +59,7 @@ jobs: uses: ./neqo/.github/actions/rust with: version: ${{ matrix.rust-toolchain }} - components: rustfmt, clippy, llvm-tools-preview + components: rustfmt, clippy, llvm-tools-preview${{ contains(matrix.rust-toolchain, 'nightly') && ', rust-src' || '' }} tools: cargo-llvm-cov, cargo-nextest, cargo-hack, cargo-machete token: ${{ secrets.GITHUB_TOKEN }} @@ -74,6 +74,14 @@ jobs: RUST_LOG=trace cargo +${{ matrix.rust-toolchain }} llvm-cov nextest $BUILD_TYPE --no-fail-fast --lcov --output-path lcov.info cargo +${{ matrix.rust-toolchain }} bench --no-run + - name: Run tests with sanitizers + if: (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-14') && matrix.rust-toolchain == 'nightly' + run: | + for sanitizer in address thread leak memory; do + echo "Running tests with $sanitizer sanitizer..." + RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly test -Z build-std --target x86_64-unknown-linux-gnu + done + - name: Check formatting run: | if [ "${{ matrix.rust-toolchain }}" != "nightly" ]; then