clap/.azure-pipelines.yml
Pavan Kumar Sunkara 6c338e42d0 Faster CI
2020-02-03 03:57:52 +01:00

65 lines
2.1 KiB
YAML

name: $(Build.BuildId)
trigger:
# This is where pull requests from "bors r+" are built.
- staging
# This is where pull requests from "bors try" are built.
- trying
# Always build master
- master
pr:
# Enable building pull requests.
- master
stages:
- stage: Testing
jobs:
- job:
variables:
rust: 1.36.0
strategy:
matrix:
Windows 32-bit (MSVC):
image: vs2017-win2016
target: i686-pc-windows-msvc
Windows 64-bit (MSVC):
image: vs2017-win2016
target: x86_64-pc-windows-msvc
Windows 32-bit (MinGW):
image: vs2017-win2016
target: i686-pc-windows-gnu
Windows 64-bit (MinGW):
image: vs2017-win2016
target: x86_64-pc-windows-gnu
pool:
vmImage: $(image)
steps:
- checkout: self
fetchDepth: 1
path: clap
displayName: Checkout repository
- task: Cache@2
inputs:
key: cargo | "$(rust)" | $(target) | Cargo.toml
path: C:\Rust\.cargo
displayName: Caching cargo
- task: Cache@2
inputs:
key: compiled | "$(rust)" | $(target) | Cargo.toml
path: target
displayName: Caching compiled
- script: rustup default $(rust)-$(target)
displayName: Install rust
- script: cargo test --all --no-default-features
displayName: Test without default features
env:
RUST_BACKTRACE: full
- script: cargo test --all --features "yaml unstable"
displayName: Test with most features
env:
RUST_BACKTRACE: full
- script: |
rmdir /Q /S C:\Rust\.cargo\registry\src
rmdir /Q /S target\.rustc_info.json
rmdir /Q /S target\debug\examples
rmdir /Q /S target\debug\incremental
displayName: Cleaning for cache
continueOnError: true