Skip to content

Commit

Permalink
Add Azure Pipelines CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspustina committed Jan 8, 2020
1 parent 3bfcd74 commit 31f31e4
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions .ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
trigger:
branches:
include: ['*']
tags:
include: ['*']

jobs:
- job: 'Clippy'
strategy:
matrix:
mac-stable:
imageName: 'macos-10.13'
rustup_toolchain: stable
linux-stable:
imageName: 'ubuntu-16.04'
rustup_toolchain: stable
pool:
vmImage: $(imageName)
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: rustup component add clippy
displayName: Install clippy
- script: cargo clippy --all --all-targets --all-features -- -D warnings $(source ".clippy.args")
displayName: Run Clippy

- job: 'Rustfmt'
pool:
vmImage: 'ubuntu-16.04'
container: 'rustlang/rust:nightly'
steps:
- script: rustup component add rustfmt
displayName: Install Rustfmt
- script: cargo fmt --all -- --check
displayName: Run fmt

- job: 'Audit'
pool:
vmImage: 'ubuntu-16.04'
container: 'rust:latest'
steps:
- script: cargo install cargo-audit
displayName: Install Cargo Audit
- script: cargo audit
displayName: Run Cargo Audit

- job: 'Test'
strategy:
matrix:
mac-minimum:
imageName: 'macos-10.13'
rustup_toolchain: 1.36.0
mac-stable:
imageName: 'macos-10.13'
rustup_toolchain: stable
linux-minimum:
imageName: 'ubuntu-16.04'
rustup_toolchain: 1.36.0
linux-stable:
imageName: 'ubuntu-16.04'
rustup_toolchain: stable
linux-beta:
imageName: 'ubuntu-16.04'
rustup_toolchain: beta
pool:
vmImage: $(imageName)
steps:
- 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"
- script: cargo check --all --tests --examples --benches
displayName: Cargo check
- script: cargo build --all --tests --examples --benches
displayName: Cargo build
- script: cargo test --all
displayName: Cargo test

0 comments on commit 31f31e4

Please sign in to comment.