jobs:
- template: default.yml@templates
parameters:
minrust: 1.36.0 # MaybeUninit
- job: miri
displayName: "Run miri on test suite"
pool:
vmImage: ubuntu-16.04
steps:
- template: install-rust.yml@templates
parameters:
rust: nightly-2020-02-25
components:
- miri
# ignore leaks due to https://github.com/crossbeam-rs/crossbeam/issues/464
- bash: yes | cargo miri -Zmiri-ignore-leaks test
displayName: cargo miri test
- job: asan
displayName: "Run address sanitizer on test suite"
pool:
vmImage: ubuntu-16.04
steps:
- template: install-rust.yml@templates
parameters:
rust: nightly
- bash: |
sudo ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer
displayName: Enable debug symbols
# only --lib --tests b/c of https://github.com/rust-lang/rust/issues/53945
- script: |
env ASAN_OPTIONS="detect_odr_violation=0" RUSTFLAGS="-Z sanitizer=address" cargo test --lib --tests --target x86_64-unknown-linux-gnu -- --test-threads=1
displayName: cargo -Z sanitizer=address test
- job: lsan
displayName: "Run leak sanitizer on test suite"
pool:
vmImage: ubuntu-16.04
steps:
- template: install-rust.yml@templates
parameters:
rust: nightly
- bash: |
sudo ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer
sed -i '/\[features\]/i [profile.dev]' Cargo.toml
sed -i '/profile.dev/a opt-level = 1' Cargo.toml
cat Cargo.toml
displayName: Enable debug symbols
- script: |
env RUSTFLAGS="-Z sanitizer=leak" cargo test --target x86_64-unknown-linux-gnu -- --test-threads=1
displayName: cargo -Z sanitizer=leak test
- template: coverage.yml@templates
parameters:
token: $(CODECOV_TOKEN_SECRET)
nightly: true
doctests: true
resources:
repositories:
- repository: templates
type: github
name: crate-ci/azure-pipelines
ref: refs/heads/v0.3
endpoint: jonhoo