-
Notifications
You must be signed in to change notification settings - Fork 283
/
azure-pipelines.yml
374 lines (339 loc) · 12.8 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
name: $(Build.SourceVersion)
# Master build triggers
trigger:
- master
# PR Triggers
pr:
autoCancel: true
branches:
include:
- master
paths:
exclude:
- README.md
jobs:
- job: Kickoff
displayName: "Kickoff"
pool:
vmImage: 'ubuntu-20.04'
steps:
- script: ./scripts/set-short-commit-variable.sh
name: shortCommitVariableStep
- job: Hygiene_Checks
displayName: 'Hygiene Checks'
# Run if not master - don't need to run hygiene checks for 'master' builds, just for PR validation
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
timeoutInMinutes: 0
pool:
vmImage: 'macOS-10.15'
variables:
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /Users/runner/.esy/3_________________________________________________________________/i
ESY__CACHE_BUILD_PATH: /Users/runner/.esy/3_________________________________________________________________/b
ESY__CACHE_SOURCE_TARBALL_PATH: /Users/runner/.esy/source/i
MACOSX_DEPLOYMENT_TARGET: 10.12
CACHE_ARTIFACT_NAME: cache-$(Agent.OS)-install
# ESY__NPM_ROOT: /usr/local/lib/node_modules/esy
steps:
- template: .ci/use-node.yml
- script: brew cleanup
continueOnError: true
- script: brew update-reset
- script: brew install ragel
- template: .ci/restore-build-cache.yml
- template: .ci/swap-xcode.yml
- template: .ci/js-build-steps.yml
- template: .ci/esy-check-hygiene.yml
- template: .ci/publish-build-cache.yml
- job: Linux
displayName: 'Linux - Ubuntu 20.04'
timeoutInMinutes: 90
pool:
vmImage: 'ubuntu-20.04'
variables:
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /home/vsts/.esy/3____________________________________________________________________/i
ESY__CACHE_BUILD_PATH: /home/vsts/.esy/3____________________________________________________________________/b
ESY__CACHE_SOURCE_TARBALL_PATH: /home/vsts/.esy/source/i
CACHE_ARTIFACT_NAME: cache-$(Agent.OS)-install
DISPLAY: :99
# ESY__NPM_ROOT: /opt/hostedtoolcache/node/8.14.0/x64/lib/node_modules/esy
steps:
- template: .ci/clean-linux-deps.yml
# - template: .ci/restore-build-cache.yml
- template: .ci/use-node.yml
- script: sudo apt-get update
- script: sudo apt-get install -y libncurses5-dev libacl1-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-utils mesa-utils-extra ragel libgtk-3-dev nasm xvfb libxxf86vm-dev
- template: .ci/run-xvfb.yml
- template: .ci/js-build-steps.yml
- template: .ci/use-esy.yml
- template: .ci/esy-build-steps.yml
- template: .ci/run-integration-tests.yml
- script: rm -rf _esy
displayName: 'Delete Onivim 2 local _esy folder prior to cache'
- template: .ci/publish-build-cache.yml
- job: CentOS
displayName: 'Linux - CentOS - Docker Image'
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-18.04'
variables:
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /home/vsts/.esy/3_________________________________________________________________________/i
ESY__CACHE_BUILD_PATH: /home/vsts/.esy/3_________________________________________________________________________/b
ESY__CACHE_SOURCE_TARBALL_PATH: /home/vsts/.esy/source/i
CACHE_ARTIFACT_NAME: cache-$(Agent.OS)-CentOS-docker-install
# ESY__NPM_ROOT: /opt/hostedtoolcache/node/8.14.0/x64/lib/node_modules/esy
steps:
- template: .ci/clean-linux-deps.yml
- template: .ci/restore-build-cache.yml
- script: sudo apt-get update
displayName: 'sudo apt-get update'
- script: sudo apt-get install libegl1-mesa
displayName: 'Install dependencies'
- script: docker build --network=host -t centos scripts/docker/centos
displayName: 'docker: build Dockerfile'
- script: docker container run --rm --volume `pwd`:/oni2 centos /bin/bash -c 'cd oni2 && git --version'
displayName: 'docker: git version (after updating)'
- script: docker container run --rm --volume `pwd`:/oni2 --volume ~/.esy:/esy/store --name centos --network=host --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined centos /bin/bash -c 'cd oni2 && ./scripts/docker-build.sh'
displayName: 'docker: build Onivim 2'
- script: ls ~/.esy
displayName: 'Check esy root path'
- script: ls $(ESY__CACHE_INSTALL_PATH)
displayName: 'Check esy cache install path after build'
- script: _release/Onivim2.AppDir/usr/bin/Oni2 -f --no-log-colors --checkhealth
displayName: 'Release: --checkhealth'
- template: .ci/publish-linux.yml
- template: .ci/publish-build-cache.yml
- job: MacOS
displayName: "MacOS 10.15"
timeoutInMinutes: 0
pool:
vmImage: 'macOS-10.15'
variables:
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /Users/runner/.esy/3_________________________________________________________________/i
ESY__CACHE_BUILD_PATH: /Users/runner/.esy/3_________________________________________________________________/b
ESY__CACHE_SOURCE_TARBALL_PATH: /Users/runner/.esy/source/i
MACOSX_DEPLOYMENT_TARGET: 10.12
CACHE_ARTIFACT_NAME: cache-$(Agent.OS)-install
# ESY__NPM_ROOT: /usr/local/lib/node_modules/esy
steps:
- template: .ci/use-node.yml
- script: brew cleanup
continueOnError: true
- script: brew update-reset
- script: brew install ragel
- template: .ci/restore-build-cache.yml
- template: .ci/swap-xcode.yml
- template: .ci/js-build-steps.yml
- template: .ci/use-esy.yml
- template: .ci/esy-build-steps.yml
parameters:
platform: darwin
- template: .ci/run-integration-tests.yml
parameters:
platform: darwin
- script: _release/Onivim2.App/Contents/MacOS/Oni2 -f --no-log-colors --checkhealth
displayName: 'Release: --checkhealth'
- template: .ci/publish-osx.yml
- template: .ci/publish-build-cache.yml
- job: Windows
timeoutInMinutes: 180
displayName: "Windows - Build & Package"
pool:
vmImage: 'windows-2019'
variables:
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /C/Users/VssAdministrator/.esy/3_____________________________________________________/i
ESY__CACHE_BUILD_PATH: /C/Users/VssAdministrator/.esy/3_____________________________________________________/b
ESY__CACHE_SOURCE_TARBALL_PATH: /C/Users/VssAdministrator/.esy/source/i
CACHE_ARTIFACT_NAME: cache-$(Agent.OS)-install
# ESY__NPM_ROOT: /C/npm/prefix/node_modules/esy
steps:
- template: .ci/clean-windows-deps.yml
- template: .ci/use-node.yml
- powershell: ./scripts/windows/verify-signtool.ps1
displayName: 'Validate signtool path'
- template: .ci/restore-build-cache.yml
- template: .ci/js-build-steps.yml
- template: .ci/use-esy.yml
- template: .ci/esy-build-steps.yml
parameters:
platform: windows
- script: dir
workingDirectory: _release/win32
displayName: 'check directory contents'
- template: .ci/publish-win.yml
- template: .ci/publish-build-cache.yml
- job: WindowsTest
timeoutInMinutes: 150
displayName: "Windows - Integration Test"
# Run if not master
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
pool:
vmImage: 'windows-2019'
variables:
STAGING_DIRECTORY: $(Build.StagingDirectory)
ESY__CACHE_INSTALL_PATH: /C/Users/VssAdministrator/.esy/3_____________________________________________________/i
ESY__CACHE_BUILD_PATH: /C/Users/VssAdministrator/.esy/3_____________________________________________________/b
ESY__CACHE_SOURCE_TARBALL_PATH: /C/Users/VssAdministrator/.esy/source/i
CACHE_ARTIFACT_NAME: cache-$(Agent.OS)-install
# ESY__NPM_ROOT: /C/npm/prefix/node_modules/esy
steps:
- template: .ci/clean-windows-deps.yml
- template: .ci/use-node.yml
- template: .ci/restore-build-cache.yml
- template: .ci/js-build-steps.yml
- template: .ci/use-esy.yml
- template: .ci/run-integration-tests.yml
parameters:
platform: windows
- job: ValidateLinuxReleaseUbuntu16
displayName: "Linux: Validate Release (Ubuntu 16.04)"
dependsOn:
- Kickoff
- CentOS
pool:
vmImage: 'ubuntu-16.04'
variables:
ONI2_SHORT_COMMIT_ID: $[dependencies.Kickoff.outputs['shortCommitVariableStep.ONI2_SHORT_COMMIT_ID'] ]
steps:
- script: echo $(ONI2_SHORT_COMMIT_ID)
- script: 'echo ArtifactDir: $(System.ArtifactsDirectory)'
displayName: 'Echo artifact dir'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'Release_Linux'
downloadPath: '$(System.ArtifactsDirectory)'
- script: ./scripts/linux/validate-release.sh
env:
SYSTEM_ARTIFACTSDIRECTORY: $(System.ArtifactsDirectory)
- job: ValidateLinuxReleaseUbuntu18
displayName: "Linux: Validate Release (Ubuntu 20.04)"
dependsOn:
- Kickoff
- CentOS
pool:
vmImage: 'ubuntu-20.04'
variables:
ONI2_SHORT_COMMIT_ID: $[dependencies.Kickoff.outputs['shortCommitVariableStep.ONI2_SHORT_COMMIT_ID'] ]
steps:
- script: echo $(ONI2_SHORT_COMMIT_ID)
- script: 'echo ArtifactDir: $(System.ArtifactsDirectory)'
displayName: 'Echo artifact dir'
- script: sudo apt-get update
displayName: 'sudo apt-get update'
- script: sudo apt-get install libegl1-mesa
displayName: 'Install dependencies'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'Release_Linux'
downloadPath: '$(System.ArtifactsDirectory)'
- script: ./scripts/linux/validate-release.sh
env:
SYSTEM_ARTIFACTSDIRECTORY: $(System.ArtifactsDirectory)
- job: ValidateMacOSRelease14
displayName: "MacOS: Validate Release (10.14)"
dependsOn:
- Kickoff
- MacOS
pool:
vmImage: 'macOS-10.14'
variables:
ONI2_SHORT_COMMIT_ID: $[dependencies.Kickoff.outputs['shortCommitVariableStep.ONI2_SHORT_COMMIT_ID'] ]
steps:
- script: echo $(ONI2_SHORT_COMMIT_ID)
- script: 'echo ArtifactDir: $(System.ArtifactsDirectory)'
displayName: 'Echo artifact dir'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'Release_Darwin'
downloadPath: '$(System.ArtifactsDirectory)'
- script: ./scripts/osx/validate-release.sh
env:
SYSTEM_ARTIFACTSDIRECTORY: $(System.ArtifactsDirectory)
- job: ValidateMacOSRelease15
displayName: "MacOS: Validate Release (10.15)"
dependsOn:
- Kickoff
- MacOS
pool:
vmImage: 'macOS-10.15'
variables:
ONI2_SHORT_COMMIT_ID: $[dependencies.Kickoff.outputs['shortCommitVariableStep.ONI2_SHORT_COMMIT_ID'] ]
steps:
- script: echo $(ONI2_SHORT_COMMIT_ID)
- script: 'echo ArtifactDir: $(System.ArtifactsDirectory)'
displayName: 'Echo artifact dir'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'Release_Darwin'
downloadPath: '$(System.ArtifactsDirectory)'
- script: ./scripts/osx/validate-release.sh
env:
SYSTEM_ARTIFACTSDIRECTORY: $(System.ArtifactsDirectory)
- job: ValidateMacOSRelease11
displayName: "MacOS: Validate Release (11)"
dependsOn:
- Kickoff
- MacOS
pool:
vmImage: 'macOS-11'
variables:
ONI2_SHORT_COMMIT_ID: $[dependencies.Kickoff.outputs['shortCommitVariableStep.ONI2_SHORT_COMMIT_ID'] ]
steps:
- script: echo $(ONI2_SHORT_COMMIT_ID)
- script: 'echo ArtifactDir: $(System.ArtifactsDirectory)'
displayName: 'Echo artifact dir'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'Release_Darwin'
downloadPath: '$(System.ArtifactsDirectory)'
- script: ./scripts/osx/validate-release.sh
env:
SYSTEM_ARTIFACTSDIRECTORY: $(System.ArtifactsDirectory)
- job: ValidateWindowsRelease
timeoutInMinutes: 30
displayName: "Windows: Validate Release"
dependsOn:
- Kickoff
- Windows
pool:
vmImage: 'vs2017-win2016'
variables:
ONI2_SHORT_COMMIT_ID: $[dependencies.Kickoff.outputs['shortCommitVariableStep.ONI2_SHORT_COMMIT_ID'] ]
steps:
- script: echo $(ONI2_SHORT_COMMIT_ID)
- script: 'echo ArtifactDir: $(System.ArtifactsDirectory)'
displayName: 'Echo artifact dir'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'Release_Windows'
downloadPath: '$(System.ArtifactsDirectory)'
- powershell: ./scripts/windows/validate-release.ps1
env:
SYSTEM_ARTIFACTSDIRECTORY: $(System.ArtifactsDirectory)
- script: echo %PATH%
# The validate-release.ps1 installs Onivim 2 and checks it,
# but we need to check from the command prompt, too via %PATH% - for #872
- script: |
set PATH=%PATH%;D:/a/1/s/Onivim2
Oni2.exe -f --silent --checkhealth
displayName: "Oni2.exe -f --silent --checkhealth (run installed)"