refactor(driver): handle panicking #214
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: TestASan | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - '**/*.rs' | |
| - '**/Cargo.toml' | |
| - '.github/workflows/ci_test_asan.yml' | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - '**/*.rs' | |
| - '**/Cargo.toml' | |
| - '.github/workflows/ci_test_asan.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
| cancel-in-progress: true | |
| env: | |
| RUST_BACKTRACE: 1 | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test_asan: | |
| runs-on: ${{ matrix.setup.os }} | |
| strategy: | |
| matrix: | |
| setup: | |
| - os: 'ubuntu-22.04' | |
| features: 'sync,ring' | |
| target: 'x86_64-unknown-linux-gnu' | |
| - os: 'ubuntu-22.04' | |
| features: 'polling,sync,ring' | |
| target: 'x86_64-unknown-linux-gnu' | |
| - os: 'ubuntu-22.04' | |
| features: 'polling,sync,ring' | |
| no_default_features: true | |
| target: 'x86_64-unknown-linux-gnu' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup nightly toolchain with rust-src | |
| run: rustup toolchain install nightly --component rust-src | |
| - name: Setup target | |
| if: ${{ matrix.setup.target }} | |
| run: rustup +nightly target install ${{ matrix.setup.target }} | |
| - uses: taiki-e/install-action@nextest | |
| - name: Run ASan tests | |
| run: | | |
| set -ex | |
| ARGS=("--features" "all,nightly") | |
| # Add features if features is not empty | |
| if [[ -n "${{ matrix.setup.features }}" ]]; then | |
| ARGS+=("--features" "${{ matrix.setup.features }}") | |
| fi | |
| # Add no-default-features if no_default_features is true | |
| if [[ -n "${{ matrix.setup.no_default_features }}" ]]; then | |
| ARGS+=("--no-default-features") | |
| fi | |
| # Specify target if target is not empty | |
| if [[ -n "${{ matrix.setup.target }}" ]]; then | |
| ARGS+=("--target" "${{ matrix.setup.target }}") | |
| fi | |
| # stress tests takes too long with ASAN, filter them out | |
| cargo +nightly nextest run \ | |
| --no-fail-fast \ | |
| --failure-output final \ | |
| -E 'not (test(stress))' \ | |
| --tests \ | |
| --lib \ | |
| -Zbuild-std \ | |
| "${ARGS[@]}" | |
| env: | |
| RUSTFLAGS: -Zsanitizer=address |