Skip to content

Commit

Permalink
Merge pull request #145 from artichoke/lopopolo/ci-leaksan-job
Browse files Browse the repository at this point in the history
Parallelize leak sanitizer tests
  • Loading branch information
lopopolo committed Mar 31, 2022
2 parents 6948107 + cabe167 commit ef665f9
Showing 1 changed file with 32 additions and 15 deletions.
47 changes: 32 additions & 15 deletions .github/workflows/ci.yaml
Expand Up @@ -52,21 +52,6 @@ jobs:
- name: Test with no default features
run: cargo test --no-default-features

- name: Install nightly Rust toolchain
if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'x86_64-apple-darwin' || matrix.target == 'x86_64-unknown-linux-gnu'
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
target: ${{ matrix.target }}
override: true

- name: Test with leak sanitizer and all features
if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'x86_64-apple-darwin' || matrix.target == 'x86_64-unknown-linux-gnu'
run: cargo test --all-features --target ${{ matrix.target }}
env:
RUSTFLAGS: "-Z sanitizer=leak"

build_x86:
name: Build 32-bit
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -144,6 +129,38 @@ jobs:
- name: Test with no default features
run: cargo test --no-default-features

leaksan:
name: Leak sanitizer
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
env:
RUSTFLAGS: -D warnings
RUST_BACKTRACE: 1
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install nightly Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
target: ${{ matrix.target }}
override: true

- name: Test with leak sanitizer and all features
run: cargo test --all-features --target ${{ matrix.target }}
env:
RUSTFLAGS: "-Z sanitizer=leak"

rust:
name: Lint and format Rust
runs-on: ubuntu-latest
Expand Down

0 comments on commit ef665f9

Please sign in to comment.