-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
650 lines (560 loc) · 24.1 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
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
name: K4A-SDK-$(SourceBranchName)-$(Date:yyyyMMdd)-$(Rev:rrr)
variables:
- name: 'skipComponentGovernaceDetection'
value: true
- name: 'linux_firmware_version'
value: '1.6.987014'
- name: 'windows_firmware_version'
value: '1.6.987014'
trigger:
batch: false
branches:
include:
- master
- develop
- release/*
- hotfix/*
jobs:
- job: WindowsK4ABuildTest
displayName: Win
strategy:
maxParallel: 100
matrix:
VS2017_x64-msvc_debug_ninja:
CMakeArch: 'amd64'
BuildGenerator: 'Ninja'
CMakeConfiguration: 'debug'
vmImage: 'vs2017-win2016'
VS2017_x64-msvc_rel_ninja:
CMakeArch: 'amd64'
BuildGenerator: 'Ninja'
CMakeConfiguration: 'relwithdebinfo'
vmImage: 'vs2017-win2016'
VS2017_x64-msvc_debug_msbuild:
CMakeArch: 'amd64'
BuildGenerator: 'Visual Studio 15 2017 Win64'
CMakeConfiguration: 'debug'
vmImage: 'vs2017-win2016'
VS2017_x64-msvc_rel_msbuild:
CMakeArch: 'amd64'
BuildGenerator: 'Visual Studio 15 2017 Win64'
CMakeConfiguration: 'relwithdebinfo'
vmImage: 'vs2017-win2016'
VS2017_x86-msvc_debug_ninja:
CMakeArch: 'x86'
BuildGenerator: 'Ninja'
CMakeConfiguration: 'debug'
vmImage: 'vs2017-win2016'
VS2017_x86-msvc_rel_ninja:
CMakeArch: 'x86'
BuildGenerator: 'Ninja'
CMakeConfiguration: 'relwithdebinfo'
vmImage: 'vs2017-win2016'
VS2017_x86-msvc_debug_msbuild:
CMakeArch: 'x86'
BuildGenerator: 'Visual Studio 15 2017'
CMakeConfiguration: 'debug'
vmImage: 'vs2017-win2016'
VS2017_x86-msvc_rel_msbuild:
CMakeArch: 'x86'
BuildGenerator: 'Visual Studio 15 2017'
CMakeConfiguration: 'relwithdebinfo'
vmImage: 'vs2017-win2016'
VS2019_x64-msvc_debug_ninja:
CMakeArch: 'amd64'
BuildGenerator: 'Ninja'
CMakeConfiguration: 'debug'
vmImage: 'windows-2019'
VS2019_x64-msvc_rel_ninja:
CMakeArch: 'amd64'
BuildGenerator: 'Ninja'
CMakeConfiguration: 'relwithdebinfo'
vmImage: 'windows-2019'
# VS2019 msbuild generators blocked by issue Microsoft/azure-pipelines-image-generation#754
# VS2019_x86_64-pc-windows-msvc_debug_msbuild:
# CMakeArch: 'amd64'
# BuildGenerator: 'Visual Studio 16 2019'
# CMakeConfiguration: 'debug'
# vmImage: 'windows-2019'
# VS2019_x86_64-pc-windows-msvc_relwithdebinfo_msbuild:
# CMakeArch: 'amd64'
# BuildGenerator: 'Visual Studio 16 2019'
# CMakeConfiguration: 'relwithdebinfo'
# vmImage: 'windows-2019'
VS2019_x86-msvc_debug_ninja:
CMakeArch: 'x86'
BuildGenerator: 'Ninja'
CMakeConfiguration: 'debug'
vmImage: 'windows-2019'
VS2019_x86-msvc_rel_ninja:
CMakeArch: 'x86'
BuildGenerator: 'Ninja'
CMakeConfiguration: 'relwithdebinfo'
vmImage: 'windows-2019'
# VS2019 msbuild generators blocked by issue Microsoft/azure-pipelines-image-generation#754
# VS2019_x86-pc-windows-msvc_debug_msbuild:
# CMakeArch: 'x86'
# BuildGenerator: 'Visual Studio 16 2019'
# CMakeConfiguration: 'debug'
# vmImage: 'windows-2019'
# VS2019_x86-pc-windows-msvc_relwithdebinfo_msbuild:
# CMakeArch: 'x86'
# BuildGenerator: 'Visual Studio 16 2019'
# CMakeConfiguration: 'relwithdebinfo'
# vmImage: 'windows-2019'
pool:
vmImage: $(vmImage)
steps:
- checkout: self
clean: true
fetchDepth: 20
lfs: false
persistCredentials: true
submodules: true
# Use Python Version
# Retrieves the specified version of Python from the tool cache. Optionally add it to PATH.
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
addToPath: true
architecture: 'x64'
- powershell: '$(Build.SourcesDirectory)/scripts/verify-windows.ps1'
displayName: 'Run verify-windows.ps1'
- script: |
git add --renormalize . && git diff-index --quiet HEAD --
IF %ERRORLEVEL% NEQ 0 (
echo "Please renormalize files before pushing using git add --renormalize ."
git status
exit /b 1
)
exit /b 0
displayName: 'Check Line Endings'
- task: BatchScript@1
displayName: 'Setup VS Env'
inputs:
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat'
arguments: '-arch=$(CMakeArch)'
modifyEnvironment: true
condition: and(succeeded(), eq(variables['vmImage'], 'vs2017-win2016'))
- task: BatchScript@1
displayName: 'Setup VS Env'
inputs:
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat'
arguments: '-arch=$(CMakeArch)'
modifyEnvironment: true
condition: and(succeeded(), eq(variables['vmImage'], 'windows-2019'))
- powershell: |
$ErrorActionPreference = "Stop"
function Download-ToTemp
{
param
(
[Parameter(Mandatory)]
[string] $url,
[string] $filename
)
if (-not ($filename))
{
$filename = Split-Path -Path $url -Leaf
}
if (-not ($filename))
{
Write-Error "Unable to parse filename from $url"
return $null
}
$tempDir = [System.IO.Path]::GetTempPath()
$path = Join-Path -Path $tempDir -ChildPath $filename
Write-Host -NoNewline "Downloading $url to $path..."
Invoke-WebRequest -Uri $url -OutFile $path -UserAgent "NativeClient"
Write-Host "Done"
return $path
}
# Download NASM
$url = "https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/win64/nasm-2.14.02-win64.zip"
$nasmzip = Download-ToTemp -url $url
Expand-Archive $nasmzip .\nasmexe
Write-Host "NASM Downloaded"
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Download NASM'
- script: |
set PATH=%PATH%;$(Build.BinariesDirectory)\nasmexe\nasm-2.14.02
cmake -G "$(BuildGenerator)" "-DCMAKE_VERBOSE_MAKEFILE=ON" "$(Build.SourcesDirectory)" "-DCMAKE_BUILD_TYPE=$(CMakeConfiguration)"
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'CMake Configure'
env:
CC: cl
CXX: cl
- task: CMake@1
displayName: 'CMake Build'
inputs:
workingDirectory: '$(Build.BinariesDirectory)'
cmakeArgs: '--build . --config "$(CMakeConfiguration)"'
- task: CMake@1
displayName: 'CMake Build Package'
inputs:
workingDirectory: '$(Build.BinariesDirectory)'
cmakeArgs: '--build . --config "$(CMakeConfiguration)" --target package'
- script: 'ctest -V -C "$(CMakeConfiguration)" -L unit'
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Unit Tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '**\TEST-*.xml'
searchFolder: '$(Build.BinariesDirectory)'
mergeTestResults: true
testRunTitle: 'Unit Tests'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy build folder to Staging'
inputs:
SourceFolder: '$(Build.BinariesDirectory)'
Contents: |
*
bin/*
docs/**/*
CMakeFiles/**/*
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Build folder'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: '$(CMakeArch)-windows-msvc-$(CMakeConfiguration)'
parallel: true
parallelCount: 8
condition: and(succeeded(), and(eq(variables['vmImage'], 'vs2017-win2016'), eq(variables['BuildGenerator'], 'Ninja')))
# This will publish symbols created from this build to the Azure DevOps symbol
# server. This symbol server will be private to Microsoft internal.
- task: PublishSymbols@2
displayName: 'Publish K4A Symbols'
inputs:
symbolsFolder: '$(Build.BinariesDirectory)'
searchPattern: 'bin/*.pdb'
indexSources: true
publishSymbols: true
symbolServerType: 'teamServices'
condition: and(succeeded(), and(eq(variables['vmImage'], 'vs2017-win2016'), eq(variables['BuildGenerator'], 'Ninja')))
- job: LinuxK4ABuildTest
displayName: Linux
pool:
vmImage: 'ubuntu-16.04'
strategy:
maxParallel: 100
matrix:
x64-clang_debug_ninja:
CMakeLinuxTargetTriple: 'x86_64-linux-clang'
CMakeConfiguration: 'debug'
x64-gnu_debug_ninja:
CMakeLinuxTargetTriple: 'x86_64-linux-gnu'
CMakeConfiguration: 'debug'
x64-clang_rel_ninja:
CMakeLinuxTargetTriple: 'x86_64-linux-clang'
CMakeConfiguration: 'relwithdebinfo'
x64-gnu_rel_ninja:
CMakeLinuxTargetTriple: 'x86_64-linux-gnu'
CMakeConfiguration: 'relwithdebinfo'
# 32-bit builds are currently broken
# i386-unknown-linux-clang_debug_ninja:
# CMakeLinuxTargetTriple: 'i386-linux-clang'
# CMakeConfiguration: 'debug'
# i386-unknown-linux-gnu_debug_ninja:
# CMakeLinuxTargetTriple: 'i386-linux-gnu'
# CMakeConfiguration: 'debug'
# i386-unknown-linux-clang_relwithdebinfo_ninja:
# CMakeLinuxTargetTriple: 'i386-linux-clang'
# CMakeConfiguration: 'relwithdebinfo'
# i386-unknown-linux-gnu_relwithdebinfo_ninja:
# CMakeLinuxTargetTriple: 'i386-linux-gnu'
# CMakeConfiguration: 'relwithdebinfo'
steps:
- checkout: self
clean: true
fetchDepth: 20
lfs: false
persistCredentials: true
submodules: true
- task: ShellScript@2
inputs:
scriptPath: '$(Build.SourcesDirectory)/scripts/bootstrap-ubuntu.sh'
displayName: 'Run bootstrap-ubuntu.sh'
- script: |
git add --renormalize . && git diff-index --quiet HEAD --
if [ $? -ne 0 ]
then
echo "Please normalize files before pushing using git add --renormalize ."
git status
exit 1
fi
displayName: 'Check Line Endings'
- script: 'cmake -GNinja -DCMAKE_VERBOSE_MAKEFILE=ON "$(Build.SourcesDirectory)" "-DCMAKE_BUILD_TYPE=$(CMakeConfiguration)" "-DCMAKE_TOOLCHAIN_FILE=$(Build.SourcesDirectory)/cmake/toolchains/$(CMakeLinuxTargetTriple).cmake"'
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'CMake Configure'
- task: CMake@1
displayName: 'CMake Build'
inputs:
workingDirectory: '$(Build.BinariesDirectory)'
cmakeArgs: '--build .'
- task: CMake@1
displayName: 'CMake Build Package'
inputs:
workingDirectory: '$(Build.BinariesDirectory)'
cmakeArgs: '--build . --target package'
- script: 'ctest -V -L unit'
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Unit Tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
searchFolder: '$(Build.BinariesDirectory)'
mergeTestResults: true
testRunTitle: 'Unit Tests'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy build folder to Staging'
inputs:
SourceFolder: '$(Build.BinariesDirectory)'
Contents: |
*
bin/*
docs/**/*
CMakeFiles/**/*
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Build folder'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: '$(CMakeLinuxTargetTriple)-$(CMakeConfiguration)'
parallel: true
parallelCount: 8
condition: and(succeeded(), contains(variables['CMakeLinuxTargetTriple'], 'clang'))
- job: DocumentationBuild
displayName: Documentation Build
pool:
vmImage: 'vs2017-win2016'
demands:
- Cmd
steps:
- checkout: self
clean: true
fetchDepth: 20
lfs: false
persistCredentials: true
submodules: true
- task: BatchScript@1
displayName: 'Setup VS2017 Env'
inputs:
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat'
modifyEnvironment: true
- powershell: |
$ErrorActionPreference = "Stop"
function Download-ToTemp
{
param
(
[Parameter(Mandatory)]
[string] $url,
[string] $filename
)
if (-not ($filename))
{
$filename = Split-Path -Path $url -Leaf
}
if (-not ($filename))
{
Write-Error "Unable to parse filename from $url"
return $null
}
$tempDir = [System.IO.Path]::GetTempPath()
$path = Join-Path -Path $tempDir -ChildPath $filename
Write-Host -NoNewline "Downloading $url to $path..."
Invoke-WebRequest -Uri $url -OutFile $path -UserAgent "NativeClient"
Write-Host "Done"
return $path
}
# Download Doxygen
$url = "https://sourceforge.net/projects/doxygen/files/rel-1.8.14/doxygen-1.8.14.windows.bin.zip/download"
$filename = "doxygen-1.8.14.windows.bin.zip"
$doxygenzip = Download-ToTemp -url $url -filename $filename
Expand-Archive $doxygenzip .\doxygenexe
Write-Host "Doxygen installed. Please use Visual Studio Developer Command prompt to build."
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Download doxygen'
- script: |
set PATH=%PATH%;$(Build.BinariesDirectory)\doxygenexe
cmake -G Ninja "-DK4A_BUILD_DOCS:BOOL=ON" "-DCMAKE_VERBOSE_MAKEFILE=ON" "$(Build.SourcesDirectory)"
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'CMake Configure'
env:
CC: cl
CXX: cl
- task: CMake@1
displayName: 'CMake Build'
inputs:
workingDirectory: '$(Build.BinariesDirectory)'
cmakeArgs: '--build . --target k4adocs'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Documentation'
inputs:
PathtoPublish: '$(Build.BinariesDirectory)\docs'
ArtifactName: docs
parallel: true
parallelCount: 8
- ${{ if eq(variables['System.CollectionId'], 'cb55739e-4afe-46a3-970f-1b49d8ee7564') }}:
- job: WindowsFunctionalTests
displayName: Windows Functional Test
dependsOn: WindowsK4ABuildTest
variables:
firmware_version: "$(windows_firmware_version)"
pool:
name: Analog-FwConnected
demands:
- Eden
- Agent.OS -equals Windows_NT
steps:
- checkout: self
clean: true
lfs: false
persistCredentials: true
submodules: false
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts'
inputs:
artifactName: 'amd64-windows-msvc-RelWithDebInfo'
parallelizationLimit: 8
- powershell: |
$null = New-Item -ItemType Directory -Force -Ea 0 -Path "$(System.ArtifactsDirectory)\depthengineplugin\windows\amd64\debug"
Invoke-WebRequest -uri "$(ResourceBaseUrl)/depthengineplugin/1.0.5/windows/amd64/debug/depthengine_1_0.dll$(ResourceToken)" -OutFile "$(System.ArtifactsDirectory)\depthengineplugin\windows\amd64\debug\depthengine_1_0.dll"
$null = New-Item -ItemType Directory -Force -Ea 0 -Path "$(System.ArtifactsDirectory)\depthengineplugin\windows\amd64\release"
Invoke-WebRequest -uri "$(ResourceBaseUrl)/depthengineplugin/1.0.5/windows/amd64/release/depthengine_1_0.dll$(ResourceToken)" -OutFile "$(System.ArtifactsDirectory)\depthengineplugin\windows\amd64\release\depthengine_1_0.dll"
$null = New-Item -ItemType Directory -Force -Ea 0 -Path "$(System.ArtifactsDirectory)\depthengineplugin\windows\x86\debug"
Invoke-WebRequest -uri "$(ResourceBaseUrl)/depthengineplugin/1.0.5/windows/x86/debug/depthengine_1_0.dll$(ResourceToken)" -OutFile "$(System.ArtifactsDirectory)\depthengineplugin\windows\x86\debug\depthengine_1_0.dll"
$null = New-Item -ItemType Directory -Force -Ea 0 -Path "$(System.ArtifactsDirectory)\depthengineplugin\windows\x86\release"
Invoke-WebRequest -uri "$(ResourceBaseUrl)/depthengineplugin/1.0.5/windows/x86/release/depthengine_1_0.dll$(ResourceToken)" -OutFile "$(System.ArtifactsDirectory)\depthengineplugin\windows\x86\release\depthengine_1_0.dll"
$null = New-Item -ItemType Directory -Force -Ea 0 -Path "$(System.ArtifactsDirectory)\firmware"
Invoke-WebRequest -uri "$(ResourceBaseUrl)/firmware/AzureKinectDK_Fw_$(firmware_version).bin$(ResourceToken)" -OutFile "$(System.ArtifactsDirectory)\firmware\AzureKinectDK_Fw_$(firmware_version).bin"
displayName: 'Download Resources'
- task: CopyFiles@2
displayName: "Copy DepthEnginePlugin into bin folder"
inputs:
sourceFolder: "$(System.ArtifactsDirectory)/depthengineplugin/windows/amd64/release/"
contents: "depthengine*.dll"
targetFolder: "$(System.ArtifactsDirectory)/amd64-windows-msvc-RelWithDebInfo/bin"
flattenFolders: true
- task: PowerShell@2
inputs:
targetType: 'filePath'
filePath: './scripts/Reset-Device.ps1'
displayName: 'Reset K4A Device'
- script: '.\amd64-windows-msvc-RelWithDebInfo\bin\AzureKinectFirmwareTool.exe -u firmware/AzureKinectDK_Fw_$(firmware_version).bin'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Update Device'
- script: '.\amd64-windows-msvc-RelWithDebInfo\bin\enumerate_devices.exe'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Check Device Health'
- script: 'python $(Build.SourcesDirectory)/scripts/RunTestList.py --list amd64-windows-msvc-RelWithDebInfo/bin/functional_test_list.txt --bin amd64-windows-msvc-RelWithDebInfo/bin/ --output=xml --gtestargs "--gtest_filter=-*ONBOARDING*"'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Run Functional Tests'
timeoutInMinutes: 15
- script: 'python $(Build.SourcesDirectory)/scripts/RunTestList.py --list amd64-windows-msvc-RelWithDebInfo/bin/functional_test_list.txt --bin amd64-windows-msvc-RelWithDebInfo/bin/ --output=xml --gtestargs "--gtest_filter=*ONBOARDING*"'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Run Functional Tests - Onboarding'
timeoutInMinutes: 15
continueOnError: true
- task: PowerShell@2
inputs:
targetType: 'filePath'
filePath: './scripts/Reset-Device.ps1'
displayName: 'Reset K4A Device'
- ${{ if eq(variables['System.CollectionId'], 'cb55739e-4afe-46a3-970f-1b49d8ee7564') }}:
- job: LinuxFunctionalTests
displayName: Linux Functional Test
dependsOn: LinuxK4ABuildTest
variables:
firmware_version: "$(linux_firmware_version)"
pool:
name: Analog-FwConnected
demands:
- Eden
- Agent.OS -equals Linux
steps:
- checkout: self
clean: true
lfs: false
persistCredentials: true
submodules: true
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts'
inputs:
artifactName: 'x86_64-linux-clang-RelWithDebInfo'
parallelizationLimit: 8
- task: CmdLine@2
displayName: 'Download Azure Kinect Firmware'
inputs:
script: curl "$(ResourceBaseUrl)/firmware/AzureKinectDK_Fw_$(firmware_version).bin$(ResourceToken)" --output $(System.ArtifactsDirectory)/firmware/AzureKinectDK_Fw_$(firmware_version).bin --create-dirs
- task: CmdLine@2
displayName: 'Download DepthEngine Plugin'
inputs:
script: |
curl "$(ResourceBaseUrl)/depthengineplugin/1.0.5/linux/x86_64/debug/libdepthengine.so.1.0$(ResourceToken)" --output $(System.ArtifactsDirectory)/depthengineplugin/linux/x86_64/debug/libdepthengine.so.1.0 --create-dirs
curl "$(ResourceBaseUrl)/depthengineplugin/1.0.5/linux/x86_64/debug/libdepthengine.so$(ResourceToken)" --output $(System.ArtifactsDirectory)/depthengineplugin/linux/x86_64/debug/libdepthengine.so --create-dirs
curl "$(ResourceBaseUrl)/depthengineplugin/1.0.5/linux/x86_64/release/libdepthengine.so.1.0$(ResourceToken)" --output $(System.ArtifactsDirectory)/depthengineplugin/linux/x86_64/release/libdepthengine.so.1.0 --create-dirs
curl "$(ResourceBaseUrl)/depthengineplugin/1.0.5/linux/x86_64/release/libdepthengine.so$(ResourceToken)" --output $(System.ArtifactsDirectory)/depthengineplugin/linux/x86_64/release/libdepthengine.so --create-dirs
- task: CmdLine@2
displayName: 'Download findconnectedport'
inputs:
script: curl "$(ResourceBaseUrl)/findconnectedport/linux/findconnectedport$(ResourceToken)" --output $(System.ArtifactsDirectory)/findconnectedport/linux/findconnectedport --create-dirs
- script: 'chmod +x $(System.ArtifactsDirectory)/findconnectedport/linux/*'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Add execution property to findconnectedport'
- task: CopyFiles@2
displayName: "Copy DepthEnginePlugin into LD_LIBRARY_PATH"
inputs:
sourceFolder: "$(System.ArtifactsDirectory)/depthengineplugin/linux/x86_64/release/"
contents: "libdepthengine.so*"
targetFolder: "$(System.ArtifactsDirectory)/x86_64-linux-clang-relwithdebinfo/bin/"
flattenFolders: true
- script: 'chmod +x ./x86_64-linux-clang-relwithdebinfo/bin/*'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Add execution property to binary files'
# Adding the bin folder to the LD_LIBRARY_PATH, so the executables can find the necessary .so files.
- script: 'echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$BUILD_ARTIFACTSTAGINGDIRECTORY/x86_64-linux-clang-relwithdebinfo/bin/"'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'set LD_LIBRARY_PATH'
# Set the DISPLAY variable since DepthEngine needs to open a display window (even there is no visual display).
- script: 'echo "##vso[task.setvariable variable=DISPLAY]:0"'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'set DISPLAY variable'
- script: 'env && which xauth && glxinfo | grep "OpenGL"'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Check openGL version'
- script: 'stty -F /dev/ttyACM0 -hupcl'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Prevent the USB connector from accidentally being reset'
# The binary is built from https://microsoft.visualstudio.com/Analog/_git/systems.rustyhmdkit
# Wait a little bit so the device can enumerate, 3 seconds has seemed good.
- script: '$(System.ArtifactsDirectory)/findconnectedport/linux/findconnectedport && sleep 3'
workingDirectory: '$(System.ArtifactsDirectory)/findconnectedport/linux/'
displayName: 'Reset K4A Device'
- script: './x86_64-linux-clang-relwithdebinfo/bin/AzureKinectFirmwareTool -u firmware/AzureKinectDK_Fw_$(firmware_version).bin'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Update Device'
env:
K4A_LOG_LEVEL: 'I'
- script: './x86_64-linux-clang-relwithdebinfo/bin/enumerate_devices'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Check Device Health'
- script: 'python $(Build.SourcesDirectory)/scripts/RunTestList.py --list x86_64-linux-clang-relwithdebinfo/bin/functional_test_list.txt --bin x86_64-linux-clang-relwithdebinfo/bin/ --output=xml --gtestargs "--gtest_filter=-*ONBOARDING*"'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Run Functional Tests'
timeoutInMinutes: 15
- script: 'python $(Build.SourcesDirectory)/scripts/RunTestList.py --list x86_64-linux-clang-relwithdebinfo/bin/functional_test_list.txt --bin x86_64-linux-clang-relwithdebinfo/bin/ --output=xml --gtestargs "--gtest_filter=*ONBOARDING*"'
workingDirectory: '$(System.ArtifactsDirectory)'
displayName: 'Run Functional Tests - Onboarding'
timeoutInMinutes: 15
continueOnError: true
# The binary is built from https://microsoft.visualstudio.com/Analog/_git/systems.rustyhmdkit
- script: '$(System.ArtifactsDirectory)/findconnectedport/linux/findconnectedport'
workingDirectory: '$(System.ArtifactsDirectory)/findconnectedport/linux/'
displayName: 'Reset K4A Device'