clap/.azure-pipelines.yml
2020-03-13 22:41:40 +03:00

66 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.40.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 --no-default-features
displayName: Test without default features
env:
RUST_BACKTRACE: full
- script: cargo test --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
rmdir /Q /S target\tests\target\debug\incremental
displayName: Cleaning for cache
continueOnError: true