@@ -8,8 +8,8 @@ variables:
8
8
MaxParallelBuildJobs : 15
9
9
MaxParallelAnalyzeJobs : 5
10
10
MaxParallelTestWindowsJobs : 5
11
- MaxParallelTestLinuxJobs : 5
12
- MaxParallelTestMacJobs : 5
11
+ MaxParallelTestLinuxJobs : 4
12
+ MaxParallelTestMacJobs : 2
13
13
WindowsAgentPoolName : pool-windows-2019
14
14
LinuxAgentPoolName : pool-ubuntu-2004
15
15
MacOSAgentPoolName : ' Azure Pipelines'
@@ -67,7 +67,10 @@ stages:
67
67
- job : generate
68
68
displayName : " Batch Generate: "
69
69
dependsOn : prepare
70
- condition : ne(dependencies.prepare.outputs['mtrx.generateTargets'], '{}')
70
+ condition : and(
71
+ ne(dependencies.prepare.outputs['mtrx.generateTargets'], ''),
72
+ ne(dependencies.prepare.outputs['mtrx.generateTargets'], '{}')
73
+ )
71
74
timeoutInMinutes : ${{ variables.GenerateTimeoutInMinutes }}
72
75
pool : ${{ variables.WindowsAgentPoolName }}
73
76
strategy :
@@ -182,7 +185,10 @@ stages:
182
185
- job : build
183
186
displayName : " Build:"
184
187
dependsOn : filter
185
- condition : ne(dependencies.filter.outputs['mtrx.buildTargets'], '{}')
188
+ condition : and(
189
+ ne(dependencies.filter.outputs['mtrx.buildTargets'], ''),
190
+ ne(dependencies.filter.outputs['mtrx.buildTargets'], '{}')
191
+ )
186
192
timeoutInMinutes : ${{ variables.BuildTimeoutInMinutes }}
187
193
pool : ${{ variables.WindowsAgentPoolName }}
188
194
strategy :
@@ -235,7 +241,7 @@ stages:
235
241
236
242
- download : current
237
243
patterns : |
238
- **/debug /**
244
+ **/Debug /**
239
245
**/StaticAnalysis/**
240
246
displayName : ' Download build artifacts'
241
247
@@ -255,14 +261,14 @@ stages:
255
261
$workspace = "$env:PIPELINE_WORKSPACE"
256
262
$repoRoot = "$(Build.SourcesDirectory)"
257
263
$artifactsRoot = Join-Path $repoRoot "artifacts"
258
- $debugArtifactDestPath = Join-Path $artifactsRoot "debug "
264
+ $debugArtifactDestPath = Join-Path $artifactsRoot "Debug "
259
265
New-Item -ItemType Directory -Force -Path $debugArtifactDestPath | Out-Null
260
266
261
267
$copiedModules = @{}
262
268
$StaticAnalysisCopied = $false
263
269
264
270
Get-ChildItem -Path $workspace -Directory | ForEach-Object {
265
- $debugArtifactSrcPath = Join-Path $_.FullName "debug "
271
+ $debugArtifactSrcPath = Join-Path $_.FullName "Debug "
266
272
$StaticAnalysisSrcDirectory = Join-Path $_.FullName 'StaticAnalysis'
267
273
268
274
if (Test-Path $debugArtifactSrcPath) {
@@ -308,7 +314,10 @@ stages:
308
314
displayName : " Analyze:"
309
315
dependsOn :
310
316
- collect
311
- condition : ne(stageDependencies.Build.filter.outputs['mtrx.analyzeTargets'], '{}')
317
+ condition : and(
318
+ ne(stageDependencies.Build.filter.outputs['mtrx.analyzeTargets'], ''),
319
+ ne(stageDependencies.Build.filter.outputs['mtrx.analyzeTargets'], '{}')
320
+ )
312
321
timeoutInMinutes : ${{ variables.AnalysisTimeoutInMinutes }}
313
322
pool : ${{ variables.WindowsAgentPoolName }}
314
323
strategy :
@@ -318,7 +327,6 @@ stages:
318
327
steps :
319
328
- checkout : self
320
329
fetchDepth : 1
321
- sparseCheckoutDirectories : tools/ .azure-pipelines/
322
330
fetchTags : false
323
331
324
332
- task : DownloadPipelineArtifact@2
@@ -357,95 +365,37 @@ stages:
357
365
script : |
358
366
Write-Host "Matrix Key: $(MatrixKey)"
359
367
360
- Write-Host "Top-level contents of $(Build.SourcesDirectory):"
361
- Get-ChildItem -Path "$(Build.SourcesDirectory)" | ForEach-Object {
362
- Write-Host $_.FullName
363
- }
364
-
365
368
$analyseModulesPath = Join-Path "$(Build.SourcesDirectory)" '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'analyse-modules.ps1'
366
369
& $analyseModulesPath -MatrixKey "$(MatrixKey)" -RepoRoot "$(Build.SourcesDirectory)"
367
370
368
-
369
371
- task : PublishPipelineArtifact@1
370
372
displayName : ' Save Analyse Report'
371
373
inputs :
372
374
targetPath : artifacts
373
375
artifact : ' analyse-$(MatrixKey)'
374
376
condition : always()
375
377
376
-
377
- # - job: test_windows
378
- # displayName: "Test Windows:"
379
- # dependsOn:
380
- # - filter
381
- # - build
382
- # condition: and(succeeded(), ne(dependencies.filter.outputs['mtrx.TestWindowsTargets'], '{}'))
383
- # timeoutInMinutes: ${{ variables.TestTimeoutInMinutes }}
384
- # pool: ${{ variables.WindowsAgentPoolName }}
385
- # strategy:
386
- # matrix: $[ dependencies.filter.outputs['mtrx.TestWindowsTargets'] ]
387
- # maxParallel: ${{ variables.MaxParallelTestWindowsJobs }}
388
-
389
- # steps:
390
- # - checkout: none
391
-
392
- # - task: PowerShell@2
393
- # name: test
394
- # displayName: 'Test Windows'
395
- # inputs:
396
- # targetType: inline
397
- # pwsh: true
398
- # script: |
399
- # $testModulesPath = Join-Path "$(Build.SourcesDirectory)" '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'test-module.ps1'
400
- # & $testModulesPath -MatrixKey "$(MatrixKey)" -Target "$(Target)" -TestEnvName 'Windows' -RepoRoot "$(Build.SourcesDirectory)" -ArtifactRoot "$(Build.ArtifactStagingDirectory)"
401
-
402
- # - job: test_linux
403
- # displayName: "Test Linux:"
404
- # dependsOn:
405
- # - filter
406
- # - build
407
- # condition: and(succeeded(), ne(dependencies.filter.outputs['mtrx.TestLinuxTargets'], '{}'))
408
- # timeoutInMinutes: ${{ variables.TestTimeoutInMinutes }}
409
- # pool: ${{ variables.LinuxAgentPoolName }}
410
- # strategy:
411
- # matrix: $[ dependencies.filter.outputs['mtrx.TestLinuxTargets'] ]
412
- # maxParallel: ${{ variables.MaxParallelTestLinuxJobs }}
413
-
414
- # steps:
415
- # - checkout: none
416
-
417
- # - task: PowerShell@2
418
- # name: test
419
- # displayName: 'Test Linux'
420
- # inputs:
421
- # targetType: inline
422
- # pwsh: true
423
- # script: |
424
- # $testModulesPath = Join-Path "$(Build.SourcesDirectory)" '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'test-module.ps1'
425
- # & $testModulesPath -MatrixKey "$(MatrixKey)" -Target "$(Target)" -TestEnvName 'Linux' -RepoRoot "$(Build.SourcesDirectory)" -ArtifactRoot "$(Build.ArtifactStagingDirectory)"
426
-
427
- # - job: test_mac
428
- # displayName: "Test Mac:"
429
- # dependsOn: filter
430
- # condition: and(succeeded(), ne(dependencies.filter.outputs['mtrx.TestMacTargets'], '{}'))
431
- # timeoutInMinutes: ${{ variables.TestTimeoutInMinutes }}
432
- # pool:
433
- # name: ${{ variables.MacOSAgentPoolName }}
434
- # vmImage: ${{ variables.MacOSAgentPoolVMImage }}
435
- # strategy:
436
- # matrix: $[ dependencies.filter.outputs['mtrx.TestMacTargets'] ]
437
- # maxParallel: ${{ variables.MaxParallelTestMacJobs }}
438
-
439
- # steps:
440
- # - checkout: none
441
-
442
- # - task: PowerShell@2
443
- # name: test
444
- # displayName: 'Test Mac'
445
- # inputs:
446
- # targetType: inline
447
- # pwsh: true
448
- # script: |
449
- # $testModulesPath = Join-Path "$(Build.SourcesDirectory)" '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'test-module.ps1'
450
- # & $testModulesPath -MatrixKey "$(MatrixKey)" -Target "$(Target)" -TestEnvName 'Mac' -RepoRoot "$(Build.SourcesDirectory)" -ArtifactRoot "$(Build.ArtifactStagingDirectory)"
451
-
378
+ - template : util/batch-generation-test-job.yml
379
+ parameters :
380
+ jobName : ' test_windows'
381
+ OSName : ' Windows'
382
+ timeoutInMinutes : ${{ variables.TestTimeoutInMinutes }}
383
+ agentPoolName : ${{ variables.WindowsAgentPoolName }}
384
+ maxParallel : ${{ variables.MaxParallelTestWindowsJobs }}
385
+
386
+ - template : util/batch-generation-test-job.yml
387
+ parameters :
388
+ jobName : ' test_linux'
389
+ OSName : ' Linux'
390
+ timeoutInMinutes : ${{ variables.TestTimeoutInMinutes }}
391
+ agentPoolName : ${{ variables.LinuxAgentPoolName }}
392
+ maxParallel : ${{ variables.MaxParallelTestLinuxJobs }}
393
+
394
+ - template : util/batch-generation-test-job.yml
395
+ parameters :
396
+ jobName : ' test_mac'
397
+ OSName : ' MacOS'
398
+ timeoutInMinutes : ${{ variables.TestTimeoutInMinutes }}
399
+ agentPoolName : ${{ variables.MacOSAgentPoolName }}
400
+ agentPoolVMImage : ${{ variables.MacOSAgentPoolVMImage }}
401
+ maxParallel : ${{ variables.MaxParallelTestMacJobs }}
0 commit comments