@@ -2,23 +2,18 @@ parameters:
2
2
name : ' '
3
3
architecture : x64
4
4
buildScript : ' '
5
- queue : {}
5
+ pool : {}
6
6
customMatrixes : ' '
7
7
codeCoverage : false
8
+ container : ' '
8
9
9
- phases :
10
- - phase : ${{ parameters.name }}
11
- variables :
12
- _buildScript : ${{ parameters.buildScript }}
13
- _phaseName : ${{ parameters.name }}
14
- _arch : ${{ parameters.architecture }}
15
- _codeCoverage : ${{ parameters.codeCoverage }}
16
- queue :
17
- ${{ if eq(variables._codeCoverage, 'false') }} :
18
- timeoutInMinutes : 30
19
- ${{ if eq(variables._codeCoverage, 'true') }} :
20
- timeoutInMinutes : 60
21
- parallel : 99
10
+ jobs :
11
+ - job : ${{ parameters.name }}
12
+ ${{ if eq(parameters.codeCoverage, 'false') }} :
13
+ timeoutInMinutes : 30
14
+ ${{ if eq(parameters.codeCoverage, 'true') }} :
15
+ timeoutInMinutes : 60
16
+ strategy :
22
17
matrix :
23
18
${{ if eq(parameters.customMatrixes, '') }} :
24
19
Debug_Build :
@@ -31,28 +26,32 @@ phases:
31
26
_includeBenchmarkData : true
32
27
${{ if ne(parameters.customMatrixes, '') }} :
33
28
${{ insert }} : ${{ parameters.customMatrixes }}
34
- ${{ insert }} : ${{ parameters.queue }}
29
+
30
+ pool : ${{ parameters.pool }}
31
+ ${{ if ne(parameters.container, '') }} :
32
+ container : ${{ parameters.container }}
33
+
35
34
steps :
36
- - ${{ if eq(parameters.queue .name, 'Hosted macOS') }} :
35
+ - ${{ if eq(parameters.pool .name, 'Hosted macOS') }} :
37
36
- script : brew update && brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f5b1ac99a7fba27c19cee0bc4f036775c889b359/Formula/libomp.rb && brew install mono-libgdiplus gettext && brew link gettext --force && brew link libomp --force
38
37
displayName : Install build dependencies
39
- - script : $(_buildScript) -$(_configuration) -buildArch=$(_arch)
38
+ - script : ${{ parameters.buildScript }} -$(_configuration) -buildArch=${{ parameters.architecture }}
40
39
displayName : Build
41
- - script : $(_buildScript) -- /t:DownloadExternalTestFiles /p:IncludeBenchmarkData=$(_includeBenchmarkData)
40
+ - script : ${{ parameters.buildScript }} -- /t:DownloadExternalTestFiles /p:IncludeBenchmarkData=$(_includeBenchmarkData)
42
41
displayName : Download Benchmark Data
43
- - script : $(_buildScript) -$(_configuration) -runtests -coverage=$(_codeCoverage)
42
+ - script : ${{ parameters.buildScript }} -$(_configuration) -runtests -coverage=${{ parameters.codeCoverage }}
44
43
displayName : Run Tests.
45
44
- script : $(Build.SourcesDirectory)/Tools/dotnetcli/dotnet msbuild build/Codecoverage.proj /p:CodeCovToken=$(CODECOV_TOKEN)
46
45
displayName : Upload coverage to codecov.io
47
- condition : and(succeeded(), eq(variables._codeCoverage, 'true' ))
46
+ condition : and(succeeded(), eq(${{ parameters.codeCoverage }}, True ))
48
47
- task : PublishTestResults@2
49
48
displayName : Publish Test Results
50
49
condition : succeededOrFailed()
51
50
inputs :
52
51
testRunner : ' vSTest'
53
52
searchFolder : ' $(System.DefaultWorkingDirectory)/bin'
54
53
testResultsFiles : ' **/*.trx'
55
- testRunTitle : Machinelearning_Tests_$(_phaseName) _$(_configuration)_$(Build.BuildNumber)
54
+ testRunTitle : Machinelearning_Tests_${{ parameters.name }} _$(_configuration)_$(Build.BuildNumber)
56
55
configuration : $(_configuration)
57
56
mergeTestResults : true
58
57
- task : CopyFiles@2
@@ -78,5 +77,5 @@ phases:
78
77
pathToPublish : $(Build.ArtifactStagingDirectory)
79
78
artifactName : ${{ parameters.name }} $(_config_short)
80
79
artifactType : container
81
- - script : $(_buildScript) -buildPackages
80
+ - script : ${{ parameters.buildScript }} -buildPackages
82
81
displayName : Build Packages
0 commit comments