]> git.proxmox.com Git - cargo.git/blob - azure-pipelines.yml
Update upstream source from tag 'upstream/0.46.0'
[cargo.git] / azure-pipelines.yml
1 trigger:
2 branches:
3 include:
4 - '*'
5 exclude:
6 - master
7
8 jobs:
9 - job: Linux
10 pool:
11 vmImage: ubuntu-16.04
12 steps:
13 - template: ci/azure-test-all.yml
14 strategy:
15 matrix:
16 stable:
17 TOOLCHAIN: stable
18 beta:
19 TOOLCHAIN: beta
20 nightly:
21 TOOLCHAIN: nightly
22 variables:
23 OTHER_TARGET: i686-unknown-linux-gnu
24
25 - job: macOS
26 pool:
27 vmImage: macos-10.15
28 steps:
29 - template: ci/azure-test-all.yml
30 variables:
31 TOOLCHAIN: stable
32 OTHER_TARGET: x86_64-apple-ios
33
34 - job: Windows
35 pool:
36 vmImage: windows-2019
37 steps:
38 - template: ci/azure-test-all.yml
39 strategy:
40 matrix:
41 x86_64-msvc:
42 TOOLCHAIN: stable-x86_64-pc-windows-msvc
43 OTHER_TARGET: i686-pc-windows-msvc
44 x86_64-gnu:
45 TOOLCHAIN: nightly-x86_64-pc-windows-gnu
46 OTHER_TARGET: i686-pc-windows-gnu
47
48 - job: rustfmt
49 pool:
50 vmImage: ubuntu-16.04
51 steps:
52 - template: ci/azure-install-rust.yml
53 - bash: rustup component add rustfmt
54 displayName: "Install rustfmt"
55 - bash: cargo fmt --all -- --check
56 displayName: "Check rustfmt (cargo)"
57 - bash: cd crates/cargo-test-macro && cargo fmt --all -- --check
58 displayName: "Check rustfmt (cargo-test-macro)"
59 - bash: cd crates/cargo-test-support && cargo fmt --all -- --check
60 displayName: "Check rustfmt (cargo-test-support)"
61 - bash: cd crates/crates-io && cargo fmt --all -- --check
62 displayName: "Check rustfmt (crates-io)"
63 - bash: cd crates/resolver-tests && cargo fmt --all -- --check
64 displayName: "Check rustfmt (resolver-tests)"
65 - bash: cd crates/cargo-platform && cargo fmt --all -- --check
66 displayName: "Check rustfmt (cargo-platform)"
67 variables:
68 TOOLCHAIN: stable
69
70 - job: resolver
71 pool:
72 vmImage: ubuntu-16.04
73 steps:
74 - template: ci/azure-install-rust.yml
75 - bash: cargo test --manifest-path crates/resolver-tests/Cargo.toml
76 displayName: "Resolver tests"
77 variables:
78 TOOLCHAIN: stable
79
80 - job: build_std
81 pool:
82 vmImage: ubuntu-16.04
83 steps:
84 - template: ci/azure-install-rust.yml
85 - bash: rustup component add rust-src
86 displayName: "Install rust-src"
87 - bash: cargo build
88 - bash: cargo test --test build-std
89 displayName: "tests"
90 variables:
91 TOOLCHAIN: nightly
92 CARGO_RUN_BUILD_STD_TESTS: 1
93
94 - job: docs
95 pool:
96 vmImage: ubuntu-16.04
97 variables:
98 TOOLCHAIN: nightly
99 steps:
100 - template: ci/azure-install-rust.yml
101 - bash: |
102 set -e
103 mkdir mdbook
104 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
105 echo "##vso[task.prependpath]`pwd`/mdbook"
106 displayName: "Install mdbook"
107 - bash: cargo doc --no-deps
108 displayName: "Build documentation"
109 - bash: cd src/doc && mdbook build --dest-dir ../../target/doc
110 displayName: "Build mdbook documentation"
111 - bash: |
112 set -e
113 rustup component add rust-docs
114 cd src/doc
115 curl -sSLo linkcheck.sh \
116 https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
117 sh linkcheck.sh --all cargo
118 displayName: "Check for broken links"