parameters:
name: ''
pool: ''
jobs:
- job: ${{ parameters.name }}
pool: ${{ parameters.pool }}
steps:
- script: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
displayName: Install rustc on non-windows
condition: not(eq(variables['Agent.OS'], 'Windows'))
- bash: |
wget -O rustup-init.exe https://win.rustup.rs/
rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain none
displayName: Install rustc on windows
condition: eq(variables['Agent.OS'], 'Windows')
- bash: |
export PATH=$PATH:$HOME/.cargo/bin
cargo fmt --all -- --check
cargo build
displayName: build