Skip to content

Commit 8be583a

Browse files
authored
CI: Only install components when needed. (jonhoo#173)
1 parent 7868e31 commit 8be583a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

azure-pipelines.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ jobs:
2525
- template: install-rust.yml@templates
2626
parameters:
2727
rust: $(rust)
28-
components:
29-
- rustfmt
30-
- clippy
3128
- script: cargo check --all-targets
3229
displayName: cargo check
3330
- script: cargo test --examples
@@ -36,10 +33,16 @@ jobs:
3633
displayName: cargo test --doc
3734
- script: cargo test --lib
3835
displayName: cargo test --lib
39-
- script: cargo fmt --all -- --check
36+
- script: |
37+
set -e
38+
rustup component add rustfmt
39+
cargo fmt --all -- --check
4040
displayName: cargo fmt --check
4141
condition: and(eq( variables['rust'], 'beta' ), eq( variables['Agent.OS'], 'Linux' ))
42-
- script: cargo clippy -- -D warnings
42+
- script: |
43+
set -e
44+
rustup component add clippy
45+
cargo clippy -- -D warnings
4346
displayName: cargo clippy
4447
condition: and(eq( variables['rust'], 'beta' ), eq( variables['Agent.OS'], 'Linux' ))
4548
# This represents the minimum Rust version supported.

0 commit comments

Comments
 (0)