-
Notifications
You must be signed in to change notification settings - Fork 11
/
azure-pipelines-template.yml
40 lines (40 loc) · 1.28 KB
/
azure-pipelines-template.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
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
stable:
rustup_toolchain: stable
# beta:
# rustup_toolchain: beta
nightly:
rustup_toolchain: nightly
steps:
- ${{ if eq(parameters.name, 'Linux') }}:
- script: |
sudo apt-get install pkg-config libssl-dev
displayName: Install dependencies
# Linux and macOS.
- ${{ if ne(parameters.name, 'Windows') }}:
- 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
# Windows.
- ${{ if eq(parameters.name, 'Windows') }}:
- script: |
curl -sSf -o rustup-init.exe https://win.rustup.rs
rustup-init.exe -y --default-toolchain %RUSTUP_TOOLCHAIN%
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin"
displayName: Install rust (windows)
# All platforms.
- script: |
rustc -Vv
cargo -V
displayName: Query rust and cargo versions
- script: cargo test --all
displayName: Test
- script: cargo run -- --search car --headless --verbose
displayName: Run