Skip to content

Fix Clippy nags and minor details found by reading the code #249

Fix Clippy nags and minor details found by reading the code

Fix Clippy nags and minor details found by reading the code #249

Workflow file for this run

on: push
name: Run Sanitizers
jobs:
sanitizers:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
sanitizer: [address]
steps:
- name: Install dependencies
run: sudo apt -y update && sudo apt -y install flex bison
if: ${{ startsWith(matrix.os, 'ubuntu') }}
- name: Install Rust nightly
run: |
rustup toolchain install nightly --profile minimal --component rust-src
rustup override set nightly
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.toolchain }}-${{ matrix.os }}-${{ matrix.sanitizer }}-sanitizer
- run: |
echo "TARGET=$(rustc -vV | awk '/^host: / { print $2 }')" >>${GITHUB_ENV}
- name: Run ${{ matrix.sanitizer }} sanitizer for ${{ env.TARGET }}
env:
RUSTFLAGS: -Z sanitizer=${{ matrix.sanitizer }}
RUSTDOCFLAGS: -Z sanitizer=${{ matrix.sanitizer }}
ASAN_OPTIONS: verbose=1:atexit=1:detect_stack_use_after_return=1:strict_string_checks=1
run: cargo test -Zbuild-std --target ${{ env.TARGET }}