mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-09 14:51:04 +00:00
73 lines
2.0 KiB
YAML
73 lines
2.0 KiB
YAML
jobs:
|
|
# Run the Rust linter
|
|
- job: "Clippy"
|
|
pool:
|
|
vmImage: "ubuntu-16.04"
|
|
container: "rust:latest"
|
|
steps:
|
|
- script: rustup component add clippy
|
|
displayName: Install Clippy
|
|
- script: cargo clippy --all
|
|
displayName: Run clippy
|
|
|
|
# Run the Rust formatter
|
|
- job: "Rustfmt"
|
|
pool:
|
|
vmImage: "ubuntu-16.04"
|
|
container: "rust:latest"
|
|
condition: eq(variables['Build.Reason'], 'PullRequest')
|
|
steps:
|
|
- script: rustup component add rustfmt
|
|
displayName: Install Rustfmt
|
|
- script: cargo fmt --all -- --check
|
|
displayName: Run Rustfmt
|
|
|
|
# Run the integration tests in a Docker container
|
|
- job: "Docker"
|
|
pool:
|
|
vmImage: "ubuntu-16.04"
|
|
steps:
|
|
- script: ./integration_test
|
|
displayName: Dockerized tests
|
|
|
|
# Run the integration tests on virtual machines
|
|
- job: "Test"
|
|
strategy:
|
|
matrix:
|
|
windows-stable:
|
|
imageName: "vs2017-win2016"
|
|
rustup_toolchain: stable
|
|
mac-stable:
|
|
imageName: "macos-10.13"
|
|
rustup_toolchain: stable
|
|
linux-stable:
|
|
imageName: "ubuntu-16.04"
|
|
rustup_toolchain: stable
|
|
linux-beta:
|
|
imageName: "ubuntu-16.04"
|
|
rustup_toolchain: beta
|
|
linux-nightly:
|
|
imageName: "ubuntu-16.04"
|
|
rustup_toolchain: nightly
|
|
pool:
|
|
vmImage: "ubuntu-16.04"
|
|
steps:
|
|
# Install Node.js
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: "12.0.0"
|
|
# Install Go
|
|
- task: GoTool@0
|
|
inputs:
|
|
versionSpec: "1.10"
|
|
# Install Rust at a fixed version for integration tests
|
|
- template: ".build/install-rust.yml"
|
|
parameters:
|
|
versionSpec: "1.34.0"
|
|
|
|
# Because integration tests rely on a fixed Rust version, we must use rustup to run with the intended toolkit
|
|
- script: rustup run $RUSTUP_TOOLCHAIN cargo build --all
|
|
displayName: Cargo build
|
|
- script: rustup run $RUSTUP_TOOLCHAIN cargo test -- --ignored
|
|
displayName: Cargo test
|