blob: 52ebd02884729109c6533de7004d68d0e35723a1 (
plain)
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
|
jobs:
- job: "Clippy"
pool:
vmImage: "ubuntu-16.04"
container: "rust:latest"
steps:
- script: rustup component add clippy
displayName: Install Clippy
- script: cargo clippy --all
displayName: Run clippy
- job: "Rustfmt"
pool:
vmImage: "ubuntu-16.04"
container: "rust:latest"
condition: eq(variables['Build.Reason'], 'PullRequest')
steps:
- script: rustup component add rustfmt
displayName: Install Rustfmt
- script: cargo fmt --all -- --check
displayName: Run Rustfmt
- job: "Bench"
pool:
vmImage: "ubuntu-16.04"
container: "rust:latest"
condition: eq(variables['Build.Reason'], 'PullRequest')
steps:
- script: cargo bench
displayName: Run benchmark
- job: "Test"
strategy:
matrix:
windows-stable:
imageName: "vs2017-win2016"
rustup_toolchain: stable
mac-stable:
imageName: "macos-10.13"
rustup_toolchain: stable
linux-stable:
imageName: "ubuntu-16.04"
rustup_toolchain: stable
linux-beta:
imageName: "ubuntu-16.04"
rustup_toolchain: beta
linux-nightly:
imageName: "ubuntu-16.04"
rustup_toolchain: nightly
pool:
vmImage: "ubuntu-16.04"
steps:
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
displayName: Install rust
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
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"
displayName: Windows install rust
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- script: cargo build --all
displayName: Cargo build
# Until env stubbing is solved, make tests run on a single thread
- script: cargo test --all -- --test-threads=1
displayName: Cargo test
|