forked from rust-lang/cargo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
118 lines (111 loc) · 3.19 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
trigger:
branches:
include:
- '*'
exclude:
- master
jobs:
- job: Linux
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure-test-all.yml
strategy:
matrix:
stable:
TOOLCHAIN: stable
beta:
TOOLCHAIN: beta
nightly:
TOOLCHAIN: nightly
variables:
OTHER_TARGET: i686-unknown-linux-gnu
- job: macOS
pool:
vmImage: macos-10.15
steps:
- template: ci/azure-test-all.yml
variables:
TOOLCHAIN: stable
OTHER_TARGET: x86_64-apple-ios
- job: Windows
pool:
vmImage: windows-2019
steps:
- template: ci/azure-test-all.yml
strategy:
matrix:
x86_64-msvc:
TOOLCHAIN: stable-x86_64-pc-windows-msvc
OTHER_TARGET: i686-pc-windows-msvc
x86_64-gnu:
TOOLCHAIN: nightly-x86_64-pc-windows-gnu
OTHER_TARGET: i686-pc-windows-gnu
- job: rustfmt
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure-install-rust.yml
- bash: rustup component add rustfmt
displayName: "Install rustfmt"
- bash: cargo fmt --all -- --check
displayName: "Check rustfmt (cargo)"
- bash: cd crates/cargo-test-macro && cargo fmt --all -- --check
displayName: "Check rustfmt (cargo-test-macro)"
- bash: cd crates/cargo-test-support && cargo fmt --all -- --check
displayName: "Check rustfmt (cargo-test-support)"
- bash: cd crates/crates-io && cargo fmt --all -- --check
displayName: "Check rustfmt (crates-io)"
- bash: cd crates/resolver-tests && cargo fmt --all -- --check
displayName: "Check rustfmt (resolver-tests)"
- bash: cd crates/cargo-platform && cargo fmt --all -- --check
displayName: "Check rustfmt (cargo-platform)"
variables:
TOOLCHAIN: stable
- job: resolver
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure-install-rust.yml
- bash: cargo test --manifest-path crates/resolver-tests/Cargo.toml
displayName: "Resolver tests"
variables:
TOOLCHAIN: stable
- job: build_std
pool:
vmImage: ubuntu-16.04
steps:
- template: ci/azure-install-rust.yml
- bash: rustup component add rust-src
displayName: "Install rust-src"
- bash: cargo build
- bash: cargo test --test build-std
displayName: "tests"
variables:
TOOLCHAIN: nightly
CARGO_RUN_BUILD_STD_TESTS: 1
- job: docs
pool:
vmImage: ubuntu-16.04
variables:
TOOLCHAIN: nightly
steps:
- template: ci/azure-install-rust.yml
- bash: |
set -e
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.3.7/mdbook-v0.3.7-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo "##vso[task.prependpath]`pwd`/mdbook"
displayName: "Install mdbook"
- bash: cargo doc --no-deps
displayName: "Build documentation"
- bash: cd src/doc && mdbook build --dest-dir ../../target/doc
displayName: "Build mdbook documentation"
- bash: |
set -e
rustup component add rust-docs
cd src/doc
curl -sSLo linkcheck.sh \
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
sh linkcheck.sh --all cargo
displayName: "Check for broken links"