sd/azure-pipelines.yml

91 lines
2.3 KiB
YAML
Raw Normal View History

2019-03-03 03:17:44 +00:00
trigger:
branches:
2019-04-15 03:11:07 +00:00
include: ['*']
tags:
include: ['*']
2019-03-03 03:17:44 +00:00
2019-06-16 19:44:55 +00:00
resources:
repositories:
- repository: templates
type: github
name: xoac/rust-azure-pipelines
ref: refs/heads/master ## TODO you may want to change it to refs/tags/TAG_NAME.
2019-06-16 19:54:01 +00:00
endpoint: githubConnection
2019-06-16 19:44:55 +00:00
2019-03-03 03:17:44 +00:00
jobs:
2019-06-16 19:44:55 +00:00
# Check formatting
- template: ci/rustfmt.yml@templates
parameters:
name: rustfmt
displayName: Check formatting
2019-06-16 20:02:31 +00:00
rust_version: nightly
2019-06-16 19:44:55 +00:00
# This represents the minimum Rust version supported.
# Tests are not run as tests may require newer versions of rust.
- template: ci/cargo-check.yml@templates
parameters:
name: minrust
rust_version: 1.31.0 # The 2018 edition
displayName: Check rust min ver
################
# Test stage #
###############
# Test stable
- template: ci/test.yml@templates
parameters:
name: cargo_test_stable
displayName: Cargo test
cross: true # Test on Windows and macOS
# Test nightly
- template: ci/test.yml@templates
parameters:
name: cargo_test_nightly
displayName: Cargo test
rust_version: nightly
2019-04-15 03:11:07 +00:00
2019-06-16 19:44:55 +00:00
# Test cross
# List of supported targets is available here: https://github.com/rust-embedded/cross#supported-targets
- template: ci/cargo-cross.yml@templates
parameters:
name: cargo_cross
displayName: Cross check and test
rust_version: stable # You can specify here beta nightly or even 1.31
test_targets:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-pc-windows-gnu
2019-04-15 03:11:07 +00:00
2019-06-16 19:44:55 +00:00
###################
# DEPLOY PART #
###################
# TODO you need to modify git parameters and specify variable in pipeline. See [README.md](https://github.com/xoac/rust-azure-pipelines/blob/master/README.md)
2019-03-03 03:17:44 +00:00
2019-06-16 19:44:55 +00:00
# Release binary
- template: ci/github-release.yml@templates
parameters:
name: github_release
dependsOn:
- minrust
- rustfmt
- cargo_test_stable
- cargo_cross
rust_version: stable
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
contents: |
*
!*.rlib
!*.d
!.*
targets:
- x86_64-unknown-linux-gnu
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
- x86_64-apple-darwin
github:
gitHubConnection: githubConnection
repositoryName: chmln/sd
2019-03-03 03:17:44 +00:00