forked from nervosnetwork/neuron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
195 lines (187 loc) · 4.38 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
trigger:
batch: true
branches:
include:
- master
- develop
- e2e-tests
- rc/*
tags:
include:
- refs/tags/v*
pr:
autoCancel: true
branches:
include:
- '*'
stages:
- stage: unit_tests
displayName: Unit Tests
jobs:
- job: mac
displayName: macOS
pool:
vmImage: 'macos-10.14'
strategy:
matrix:
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
yarn global add lerna
yarn bootstrap
CI=false yarn build
name: Bootstrap
- script: CI=true yarn test
name: Test
- job: linux
displayName: Linux
pool:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
yarn global add lerna
yarn bootstrap
CI=false yarn build
name: Bootstrap
- script: |
export DISPLAY=':99.0'
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
CI=true yarn test
name: Test
- job: win
displayName: Windows
pool:
vmImage: 'windows-2019'
strategy:
matrix:
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: yarn global add lerna
displayName: 'Install lerna'
- script: |
yarn bootstrap
set CI=false
yarn build
name: Build
- script: |
set CI=true
yarn test
name: Test
- stage: e2e_tests
displayName: Integration Tests
dependsOn: []
condition: false # eq(variables['build.sourceBranch'], 'refs/heads/master')
jobs:
- job: Integration
displayName: Integration Tests
pool:
vmImage: 'macos-10.14'
steps:
- task: NodeTool@0
inputs:
versionSpec: 12.x
displayName: 'Install Node.js'
- script: |
yarn global add lerna
yarn bootstrap
name: Bootstrap
- script: yarn test:e2e
name: Test
- stage: release
displayName: Release Binaries
condition: eq(variables['build.sourceBranch'], 'refs/heads/master')
jobs:
- job: release_mac
displayName: Release macOS
pool:
vmImage: 'macos-10.14'
steps:
- task: NodeTool@0
inputs:
versionSpec: 12.x
displayName: 'Install Node.js'
- script: |
yarn global add lerna
yarn bootstrap
name: Bootstrap
- task: DownloadSecureFile@1
name: macSiginingCertificate
displayName: 'Download macOS Signing Certificate'
inputs:
secureFile: Neuron_mac.p12
- script: |
./scripts/download-ckb.sh mac
yarn release mac
name: Release
displayName: 'Sign and Release'
env:
CSC_LINK: $(macSiginingCertificate.secureFilePath)
CSC_KEY_PASSWORD: $(macSiginingCertificatePassword)
APPLE_ID: $(appleId)
APPLE_ID_PASSWORD: $(appleIdPassword)
GH_TOKEN: $(ghToken)
- job: release_linux
displayName: Release Linux
pool:
vmImage: 'ubuntu-18.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: 12.x
displayName: 'Install Node.js'
- script: |
yarn global add lerna
yarn bootstrap
name: Bootstrap
- script: |
./scripts/download-ckb.sh
yarn release linux
name: Release
displayName: 'Sign and Release'
env:
GH_TOKEN: $(ghToken)
- job: release_win
displayName: Release Windows
pool:
vmImage: 'macos-10.14'
steps:
- task: NodeTool@0
inputs:
versionSpec: 12.x
displayName: 'Install Node.js'
- script: |
yarn global add lerna
yarn bootstrap
name: Bootstrap
- task: DownloadSecureFile@1
name: winSiginingCertificate
displayName: 'Download Windows Signing Certificate'
inputs:
secureFile: Neuron_win.p12
- script: |
./scripts/download-ckb.sh win
yarn release win
name: Release
displayName: 'Sign and Release'
env:
WIN_CSC_LINK: $(winSiginingCertificate.secureFilePath)
WIN_CSC_KEY_PASSWORD: $(winSiginingCertificatePassword)
GH_TOKEN: $(ghToken)