-
Notifications
You must be signed in to change notification settings - Fork 16
/
azure-pipelines.yml
73 lines (72 loc) · 2.38 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
# 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
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