2019-07-15 05:28:11 +02:00
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include: ["*"]
|
|
|
|
tags:
|
|
|
|
include: ["*"]
|
|
|
|
|
2019-04-04 05:33:19 +02:00
|
|
|
jobs:
|
2019-05-16 17:40:30 +02:00
|
|
|
# Check formatting
|
2019-07-14 23:54:45 +02:00
|
|
|
- template: ci/rustfmt.yml
|
2019-05-16 17:40:30 +02:00
|
|
|
parameters:
|
|
|
|
name: rustfmt
|
2019-07-14 23:54:45 +02:00
|
|
|
displayName: Check formatting
|
2019-04-04 05:20:55 +02:00
|
|
|
|
2019-07-14 23:54:45 +02:00
|
|
|
# Run linter
|
|
|
|
- template: ci/cargo-clippy.yml
|
2019-05-16 17:40:30 +02:00
|
|
|
parameters:
|
2019-07-14 23:54:45 +02:00
|
|
|
name: cargo_clippy
|
|
|
|
displayName: Run linter
|
2019-05-16 17:40:30 +02:00
|
|
|
|
2019-07-14 23:54:45 +02:00
|
|
|
# Cargo check
|
|
|
|
- template: ci/cargo-check.yml
|
2019-05-16 17:40:30 +02:00
|
|
|
parameters:
|
2019-07-14 23:54:45 +02:00
|
|
|
name: cargo_check
|
|
|
|
displayName: Cargo check
|
2019-04-04 05:20:55 +02:00
|
|
|
|
2019-07-14 23:54:45 +02:00
|
|
|
##############
|
|
|
|
# Test stage #
|
|
|
|
##############
|
|
|
|
|
|
|
|
# Test stable
|
|
|
|
- template: ci/test.yml
|
|
|
|
parameters:
|
|
|
|
dependsOn:
|
|
|
|
- cargo_check
|
|
|
|
name: cargo_test_stable
|
|
|
|
displayName: Cargo test
|
|
|
|
cross: true # Test on Windows and macOS
|
|
|
|
|
|
|
|
# Test nightly
|
|
|
|
- template: ci/test.yml
|
|
|
|
parameters:
|
|
|
|
name: cargo_test_nightly
|
|
|
|
displayName: Cargo test
|
|
|
|
rust_version: nightly
|
|
|
|
|
|
|
|
# Test docker
|
|
|
|
# Runs integration tests as a starship developer would run them locally
|
|
|
|
- template: ci/test-docker.yml
|
|
|
|
parameters:
|
2019-05-29 13:27:18 +02:00
|
|
|
name: test_docker
|
2019-07-14 23:54:45 +02:00
|
|
|
displayName: Docker test
|
|
|
|
|
|
|
|
################
|
|
|
|
# Release stage #
|
|
|
|
################
|
|
|
|
|
|
|
|
# Release binary
|
|
|
|
- template: ci/github-release.yml
|
|
|
|
parameters:
|
|
|
|
name: github_release
|
|
|
|
dependsOn:
|
|
|
|
- rustfmt
|
|
|
|
- cargo_check
|
|
|
|
- cargo_clippy
|
|
|
|
- cargo_test_stable
|
|
|
|
- test_docker
|
|
|
|
rust_version: stable
|
|
|
|
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
|
|
|
|
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: true
|