This repository has been archived by the owner on Mar 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
azure-pipelines.yml
84 lines (77 loc) · 2.74 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
trigger:
branches:
include: ['*']
tags:
include: ['*']
resources:
repositories:
- repository: rust_pipelines
type: github
name: xoac/rust-azure-pipelines
# ref: refs/tags/v0.1.0-alpha.2
ref: refs/heads/master # TODO you may want to change it to refs/tags/TAG_NAME.
endpoint: PipelinesTemplates # TODO YOU NEED TO CHANGE THIS!
stages:
- stage: check
displayName: "Quick checks"
jobs:
- template: ci/scenarios/check.yml@rust_pipelines
parameters: # You can make conditions here.
cargo-check: true
cargo-check-nigtly: true # this can fail and stage check still succeed
cargo-clippy: true
rustfmt: true
- stage: test
displayName: "Multi OS native tests"
jobs:
- template: ci/scenarios/test.yml@rust_pipelines
parameters:
min_rust_supported: 1.31.1 # this is default setting for test
# This stage allow to easy test your crate using cross project.
# Supported targets: https://github.com/rust-embedded/cross#supported-targets
- stage: embedded
displayName: "Cross check and tests"
dependsOn:
- check
jobs:
- template: ci/scenarios/embeeded.yml@rust_pipelines
parameters:
checks:
- target: mips-unknown-linux-musl
name: cross_chcek_i686_unknown_freebsd
- target: aarch64-unknown-linux-gnu
name: cross_check_aarch64_unknown_linux_gnu
tests:
- target: i686-unknown-linux-gnu
name: cross_test_i686_unknown_linux_gnu
# This stage build binaries - you can deploy them in next stage
- stage: build
displayName: "Builds"
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
dependsOn:
- embedded
- test
jobs:
- template: ci/scenarios/builds.yml@rust_pipelines
parameters:
artifactName: target
# This stage will be create github realese and upload binaries from build stage. It will also generate documentaion for master and upload it to gh-pages.
- stage: deploy
displayName: "Deploys"
dependsOn:
- build
jobs:
# Deploy doc
- template: ci/scenarios/github/deploy-doc.yml@rust_pipelines
parameters:
branch: master
job_name: github_deploy_doc
github: # TODO You need modify this parameters to deploy doc
user: xoac
email: [email protected]
repo: https://github.com/xoac/rust-azure-pipelines/
# Create releases deploy binaries
- template: ci/scenarios/github/release.yml@rust_pipelines
parameters:
job_condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
gitHubConnection: PipelinesTemplates # TODO This connection need write access to your repo! https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azure-devops