forked from taiki-e/auto_enums
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
130 lines (122 loc) · 3.55 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Refs: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml
schedules:
- cron: "0 1 * * *"
displayName: Cron (Daily)
branches:
include:
- master
always: true
trigger:
- master
- staging
- trying
variables:
RUSTFLAGS: -Dwarnings
jobs:
# This is the minimum Rust version supported by auto_enums.
# When updating this, the reminder to update the minimum supported
# Rust version in README.md.
#
# Tests are not run as tests may require newer versions of rust.
- template: ci/azure-test.yml
parameters:
toolchain: 1.31.0
name: minrust
cmd: check
- template: ci/azure-test.yml
parameters:
toolchain: stable
name: stable
- template: ci/azure-test.yml
parameters:
toolchain: beta
name: beta
- template: ci/azure-test.yml
parameters:
toolchain: nightly
name: nightly
- job: compiletest
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure-install-rust.yml
parameters:
toolchain: nightly
- script: |
cargo clean
cargo test -p auto_enums --all-features --test compiletest
env:
RUSTFLAGS: -Dwarnings --cfg compiletest
displayName: compiletest
- job: clippy
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure-install-rust.yml
parameters:
toolchain: nightly
- script: |
set +e
if rustup component add clippy; then
set -e
else
# If clippy is unavailable on the latest nightly,
# use the latest toolchain with clippy available.
# Refs: https://github.com/rust-lang/rustup-components-history#the-web-part
set -e
target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy`
echo "'clippy' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead"
rustup toolchain install nightly-$target
rustup default nightly-$target
rustup component add clippy
rustup toolchain list
rustc -Vv
cargo -V
fi
cargo clippy --version
displayName: Install clippy
- script: |
cargo clippy --all --all-features
displayName: cargo clippy
- job: rustfmt
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure-install-rust.yml
parameters:
toolchain: nightly
- script: |
set +e
if rustup component add rustfmt; then
set -e
else
# If rustfmt is unavailable on the latest nightly,
# use the latest toolchain with rustfmt available.
# Refs: https://github.com/rust-lang/rustup-components-history#the-web-part
set -e
target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt`
echo "'rustfmt' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead"
rustup toolchain install nightly-$target
rustup default nightly-$target
rustup component add rustfmt
rustup toolchain list
rustc -Vv
cargo -V
fi
cargo fmt --version
displayName: Install rustfmt
- script: |
cargo fmt --all -- --check
displayName: cargo fmt -- --check
- job: rustdoc
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure-install-rust.yml
parameters:
toolchain: nightly
- script: |
cargo doc --no-deps --all --all-features
env:
RUSTDOCFLAGS: -Dwarnings
displayName: cargo doc