-
Notifications
You must be signed in to change notification settings - Fork 53
/
azure-pipelines.yml
91 lines (81 loc) · 2.87 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
# https://aka.ms/yaml
strategy:
matrix:
windows-stable:
imageName: 'windows-latest'
rustup_toolchain: stable
windows-beta:
imageName: 'windows-latest'
rustup_toolchain: beta
windows-nightly:
imageName: 'windows-latest'
rustup_toolchain: nightly
mac-stable:
imageName: 'macos-latest'
rustup_toolchain: stable
mac-beta:
imageName: 'macos-latest'
rustup_toolchain: beta
mac-nightly:
imageName: 'macos-latest'
rustup_toolchain: nightly
linux-stable:
imageName: 'ubuntu-latest'
rustup_toolchain: stable
linux-beta:
imageName: 'ubuntu-latest'
rustup_toolchain: beta
linux-nightly:
imageName: 'ubuntu-latest'
rustup_toolchain: nightly
pool:
vmImage: $(imageName)
steps:
# Need to remove rust-toolchain or we will always use the version specified
# there regardless of what version is installed
# Also need to set the PATH environment variable
- script: |
rm rust-toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
source $HOME/.cargo/env
rustc --version --verbose
displayName: install
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
rm rust-toolchain
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
rustc --version --verbose
displayName: install (windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
# -D warnings denies all warnings so that we always know when some code
# introduces new ones
- script: |
rustc --version --verbose
cargo build --verbose --all
cargo build --verbose --all --features "unstable"
cargo build --verbose --all --examples --features "unstable"
cargo test --verbose --all --features "test unstable" --no-run
env: { RUSTFLAGS: "-D warnings" }
displayName: build
# Ensure that we can actually run without crashing on each supported platform
- script: |
cargo run --verbose --example runtest
displayName: "smoke test"
enabled: false
- script: |
cargo test --verbose --all --features "test unstable"
displayName: test
# TODO: Use the latest version of tarpaulin once our code compiles with it
- script: |
cargo install --verbose cargo-tarpaulin --version '0.13.3'
cargo tarpaulin --verbose --all --features "test unstable" --out Xml --run-types Tests Doctests
bash <(curl -s https://codecov.io/bash)
displayName: code_coverage
condition: and( eq( variables['Agent.OS'], 'Linux' ), eq( variables['rustup_toolchain'], 'nightly' ) )
- script: |
cargo doc --no-deps --verbose --all
cargo doc --no-deps --verbose --all --features "unstable"
displayName: docs