jobs:
- template: default.yml@templates
parameters:
minrust: 1.48.0
codecov_token: $(CODECOV_TOKEN_SECRET)
- job: benchmark
displayName: "Check that benchmark compiles"
pool:
vmImage: ubuntu-latest
steps:
- template: install-rust.yml@templates
- script: cargo check
displayName: cargo check benchmark/
workingDirectory: "benchmark"
- job: miri
displayName: "Run miri on test suite"
pool:
vmImage: ubuntu-latest
steps:
- bash: |
echo '##vso[task.setvariable variable=nightly]nightly-'$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)
displayName: "Determine latest miri nightly"
- template: install-rust.yml@templates
parameters:
rust: $(nightly)
components:
- miri
- script: cargo miri setup
displayName: cargo miri setup
- script: cargo miri test
displayName: cargo miri test
env:
QUICKCHECK_TESTS: 500
- job: asan
displayName: "Run address sanitizer on test suite"
pool:
vmImage: ubuntu-latest
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
- script: |
env ASAN_OPTIONS="detect_odr_violation=0" RUSTFLAGS="-Z sanitizer=address" cargo test --lib --tests --target x86_64-unknown-linux-gnu
displayName: cargo -Z sanitizer=address test
- job: lsan
displayName: "Run leak sanitizer on test suite"
pool:
vmImage: ubuntu-latest
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
displayName: cargo -Z sanitizer=leak test
resources:
repositories:
- repository: templates
type: github
name: crate-ci/azure-pipelines
ref: refs/heads/v0.4
endpoint: jonhoo