Skip to content

Commit

Permalink
ci: run with sanitizers
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Sep 2, 2024
1 parent c732bd2 commit 9bf01aa
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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, ${{ matrix.rust-toolchain == 'nightly' && 'rust-src' || '' }}
tools: cargo-llvm-cov, cargo-nextest, cargo-hack, cargo-machete
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -74,6 +74,23 @@ 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: |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
TARGET="x86_64-unknown-linux-gnu"
SANITIZERS="address thread leak memory"
elif [ "${{ matrix.os }}" = "macos-14" ]; then
TARGET="aarch64-apple-darwin"
# no memory and leak sanitizer support yet
SANITIZERS="address thread"
fi
for sanitizer in $SANITIZERS; do
echo "Running tests with $sanitizer sanitizer..."
RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly test -Z build-std --target $TARGET
done
- name: Check formatting
run: |
if [ "${{ matrix.rust-toolchain }}" != "nightly" ]; then
Expand Down

0 comments on commit 9bf01aa

Please sign in to comment.