forked from jonhoo/flurry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
39 lines (38 loc) · 1.24 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
jobs:
- template: default.yml@templates
parameters:
codecov_token: $(CODECOV_TOKEN_SECRET)
minrust: 1.36.0 # parking_lot 0.10
- job: deny
displayName: "Disallowed attributes"
pool:
vmImage: ubuntu-16.04
steps:
# Work around https://github.com/microsoft/azure-pipelines-tasks/issues/12179
- bash: |
sudo rm -r /usr/share/rust/.cargo/bin
displayName: Remove .cargo/bin so we can restore it from cache
- task: Cache@2
inputs:
key: cargo-deny | $(Agent.OS)
path: /usr/share/rust/.cargo/bin
cacheHitVar: CACHE_RESTORED
- bash: |
find -D exec /usr/share/rust/.cargo/bin ! -name 'cargo-deny' -type f -exec rm {} +
displayName: Only rely on cached cargo-deny
condition: eq(variables.CACHE_RESTORED, 'true')
- template: install-rust.yml@templates
parameters:
rust: stable
- script: cargo install cargo-deny
displayName: install cargo-deny
condition: ne(variables.CACHE_RESTORED, 'true')
- script: cargo deny check
displayName: cargo deny
resources:
repositories:
- repository: templates
type: github
name: crate-ci/azure-pipelines
ref: refs/heads/v0.3
endpoint: jonhoo