Add azure pipelines definition
This commit is contained in:
60
.azure-pipelines.yml
Normal file
60
.azure-pipelines.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
name: $(Build.SourceBranch)-$(date:yyyyMMdd)$(rev:.r)
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
- job: Build
|
||||
strategy:
|
||||
matrix:
|
||||
windows-stable:
|
||||
imageName: 'vs2017-win2016'
|
||||
rustup_toolchain: stable
|
||||
linux-stable:
|
||||
imageName: 'ubuntu-16.04'
|
||||
rustup_toolchain: stable
|
||||
mac-stable:
|
||||
imageName: 'macos-10.14'
|
||||
rustup_toolchain: stable
|
||||
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
- script: |
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
|
||||
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
|
||||
export PATH=$PATH:$HOME/.cargo/bin
|
||||
rustup update $RUSTUP_TOOLCHAIN
|
||||
rustup default $RUSTUP_TOOLCHAIN
|
||||
rustc --version
|
||||
displayName: Install rust (*nix)
|
||||
condition: ne( variables['Agent.OS'], 'Windows_NT' )
|
||||
- script: |
|
||||
rustup update %RUSTUP_TOOLCHAIN%
|
||||
rustup default %RUSTUP_TOOLCHAIN%
|
||||
rustc --version
|
||||
displayName: Install rust (Win)
|
||||
condition: eq( variables['Agent.OS'], 'Windows_NT' )
|
||||
- script: |
|
||||
rustup component add --toolchain stable rustfmt-preview
|
||||
rustup component list --toolchain stable
|
||||
displayName: Add rustfmt
|
||||
- script: |
|
||||
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %TEMP%\LLVM-8.0.0-win64.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/LLVM-8.0.0-win64.exe"
|
||||
%TEMP%\LLVM-8.0.0-win64.exe /S /NCRC
|
||||
condition: eq(variables['Agent.OS'], 'Windows_NT')
|
||||
displayName: Install clang (Win)
|
||||
- script: cargo fetch
|
||||
displayName: Fetch cargo dependencies
|
||||
- script: cargo +stable fmt --all -- --check
|
||||
displayName: Check formatting
|
||||
- script: cargo build --release
|
||||
displayName: Cargo build release
|
||||
- script: cargo build
|
||||
displayName: Cargo build
|
||||
- bash: RUST_BACKTRACE=1 cargo test --all
|
||||
displayName: Cargo test
|
||||
|
||||
Reference in New Issue
Block a user