2019-07-15 03:28:11 +00:00
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include: ["*"]
|
|
|
|
tags:
|
|
|
|
include: ["*"]
|
|
|
|
|
2019-07-31 23:27:35 +00:00
|
|
|
stages:
|
|
|
|
- stage: Checks
|
|
|
|
jobs:
|
|
|
|
# Check formatting
|
|
|
|
- template: ci/rustfmt.yml
|
|
|
|
parameters:
|
|
|
|
name: rustfmt
|
|
|
|
displayName: Check formatting
|
2019-04-04 03:20:55 +00:00
|
|
|
|
2019-07-31 23:27:35 +00:00
|
|
|
# Run linter
|
|
|
|
- template: ci/cargo-clippy.yml
|
|
|
|
parameters:
|
|
|
|
name: cargo_clippy
|
|
|
|
displayName: Run linter
|
2019-05-16 15:40:30 +00:00
|
|
|
|
2019-07-31 23:27:35 +00:00
|
|
|
# Cargo check
|
|
|
|
- template: ci/cargo-check.yml
|
|
|
|
parameters:
|
|
|
|
name: cargo_check
|
|
|
|
displayName: Cargo check
|
|
|
|
|
|
|
|
- stage: Test
|
|
|
|
dependsOn: Checks
|
|
|
|
jobs:
|
|
|
|
# Test stable
|
|
|
|
- template: ci/test.yml
|
|
|
|
parameters:
|
|
|
|
name: cargo_test_stable
|
|
|
|
displayName: Cargo test
|
|
|
|
cross: true # Test on Windows and macOS
|
2019-04-04 03:20:55 +00:00
|
|
|
|
2019-07-31 23:27:35 +00:00
|
|
|
# Test nightly
|
|
|
|
- template: ci/test.yml
|
|
|
|
parameters:
|
|
|
|
name: cargo_test_nightly
|
|
|
|
displayName: Cargo test
|
|
|
|
rust_version: nightly
|
2019-07-14 21:54:45 +00:00
|
|
|
|
2019-07-31 23:27:35 +00:00
|
|
|
# Test docker
|
|
|
|
# Runs integration tests as a starship developer would run them locally
|
|
|
|
- template: ci/test-docker.yml
|
|
|
|
parameters:
|
|
|
|
name: test_docker
|
|
|
|
displayName: Docker test
|
2019-07-14 21:54:45 +00:00
|
|
|
|
2019-07-31 23:27:35 +00:00
|
|
|
- stage: Release
|
|
|
|
dependsOn:
|
|
|
|
- Checks
|
|
|
|
- Test
|
|
|
|
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
|
|
|
|
jobs:
|
|
|
|
# Release binary on GitHub
|
|
|
|
- template: ci/github-release.yml
|
|
|
|
parameters:
|
|
|
|
name: github_release
|
|
|
|
rust_version: stable
|
|
|
|
contents: |
|
|
|
|
*
|
|
|
|
!*.rlib
|
|
|
|
!*.d
|
|
|
|
!.*
|
|
|
|
targets:
|
|
|
|
- x86_64-unknown-linux-gnu
|
|
|
|
# Windows support temporarily disabled
|
|
|
|
# - x86_64-pc-windows-gnu
|
|
|
|
# - x86_64-pc-windows-msvc
|
|
|
|
- x86_64-apple-darwin
|
|
|
|
github:
|
|
|
|
gitHubConnection: StarshipRelease
|
|
|
|
repositoryName: starship/starship
|
|
|
|
isPreRelease: false
|
2019-07-14 21:54:45 +00:00
|
|
|
|
2019-07-31 23:27:35 +00:00
|
|
|
# Publish package to Crates.io
|
|
|
|
- template: ci/cargo-publish.yml
|
|
|
|
parameters:
|
|
|
|
name: cargo_publish
|
|
|
|
displayName: Publish to Crates.io
|