forked from graphql-rust/juniper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
109 lines (99 loc) · 3.52 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
jobs:
###################################################
# Formatting
###################################################
- job: check_formatting
displayName: Check formatting
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
export CARGO_HOME="$HOME/.cargo"
curl https://sh.rustup.rs -sSf | sh -s -- -y
$HOME/.cargo/bin/rustup component add rustfmt
displayName: Install stable Rust
- script: |
$HOME/.cargo/bin/cargo fmt -- --check
displayName: Run rustfmt
###################################################
# Book
###################################################
- job: run_book_tests
displayName: Book code example tests
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
export CARGO_HOME="$HOME/.cargo"
curl https://sh.rustup.rs -sSf | sh -s -- -y
$HOME/.cargo/bin/rustup component add rustfmt
displayName: Install stable Rust
- script: |
cd docs/book/tests && $HOME/.cargo/bin/cargo test
displayName: Test book code examples via skeptic
- job: build_book_master
displayName: Build rendered book on master branch and push to Github
pool:
vmImage: 'ubuntu-latest'
dependsOn: run_book_tests
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
variables:
- group: github-keys
steps:
- task: InstallSSHKey@0
inputs:
hostName: $(GHSshKnownHosts)
sshPublicKey: $(GHSshPub)
sshKeySecureFile: $(GHSshPriv)
- script: |
./docs/book/ci-build.sh master
###################################################
# Main Builds
###################################################
- template: _build/azure-pipelines-template.yml
parameters:
name: Linux
vmImage: 'ubuntu-latest'
- template: _build/azure-pipelines-template.yml
parameters:
name: macOS
vmImage: 'macOS-latest'
- template: _build/azure-pipelines-template.yml
parameters:
name: Windows
vmImage: 'windows-latest'
###################################################
# Releases
###################################################
- job: check_release_automation
displayName: Check release automation
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
export CARGO_HOME="$HOME/.cargo"
curl https://sh.rustup.rs -sSf | sh -s -- -y
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
displayName: Install stable Rust
- script: |
_build/cargo-make.sh "0.20.0" "x86_64-unknown-linux-musl"
displayName: Install cargo-make binary
- script: |
cargo install --debug --version=0.11.2 cargo-release
displayName: Install cargo-release binary
- script: |
git config --local user.name "Release Test Bot"
git config --local user.email "[email protected]"
displayName: Set up git
- script: |
RELEASE_LEVEL="minor" cargo make release-dry-run
displayName: Dry run mode
- script: |
RELEASE_LEVEL="minor" cargo make release-local-test
displayName: Local test mode
- script: |
git --no-pager log -p HEAD...HEAD~20
# NOTE: this is rolled into one task due to onerous
# "bash not found" error on Azure.
cargo make workspace-ci-flow --no-workspace
displayName: Echo local changes && make sure build and tests still work