11# Copyright (c) Microsoft Corporation.
22# Licensed under the MIT License.
33
4- # Since we're boosting our builds by using a private, pre-compiled raw toolchain
5- # the pipeline requires defining the following variables outside of the YAML:
6- # - rawToolchainCacheURL_AMD64
7- # - rawToolchainCacheURL_ARM64
4+ # The "agentPool" parameter is defined in the "Agent pools (DEV)" variable group.
5+ # The "rawToolchain*" parameters are defined in the "Raw toolchain info" variable group.
86
97trigger : none
108
@@ -13,15 +11,15 @@ parameters:
1311 type : object
1412 default :
1513 - name : " AMD64"
16- agentPool : " $(DEV_AMD64_Managed)" # Pool defined inside the "Agent pools (DEV)" variable group.
14+ agentPool : " $(DEV_AMD64_Managed)"
1715 maxCPUs : " $(($(nproc) / 2))"
18- rawToolchainCacheURL : " $(rawToolchainCacheURL_AMD64 )"
19- rawToolchainExpectedHash : " f56df34b90915c93f772d3961bf5e9eeb8c1233db43dd92070214e4ce6b72894 "
16+ rawToolchainCacheURL : " $(rawToolchainCacheURL_AMD64_2.0 )"
17+ rawToolchainExpectedHash : " $(rawToolchainCacheHash_AMD64_2.0) "
2018 - name : " ARM64"
21- agentPool : " $(DEV_ARM64_Managed)" # Pool defined inside the "Agent pools (DEV)" variable group.
19+ agentPool : " $(DEV_ARM64_Managed)"
2220 maxCPUs : " $(($(nproc) / 3))"
23- rawToolchainCacheURL : " $(rawToolchainCacheURL_ARM64 )"
24- rawToolchainExpectedHash : " 65de43b3bdcfdaac71df1f11fd1f830a8109b1eb9d7cb6cbc2e2d0e929d0ef76 "
21+ rawToolchainCacheURL : " $(rawToolchainCacheURL_ARM64_2.0 )"
22+ rawToolchainExpectedHash : " $(rawToolchainCacheHash_ARM64_2.0) "
2523 - name : debug
2624 type : boolean
2725 default : false
@@ -36,12 +34,15 @@ resources:
3634
3735variables :
3836 - group : " Agent pools (DEV)"
37+ - group : " Raw toolchain info"
3938 - name : rpmsArtifactNameBase
4039 value : RPMs
4140 - name : toolchainArtifactNameBase
4241 value : Toolchain
42+ - name : toolchainTestsArtifactNameBase
43+ value : Toolchain_tests
4344 - name : system.debug
44- value : ' ${{ parameters.debug }}'
45+ value : " ${{ parameters.debug }}"
4546
4647extends :
4748 template : v2/OneBranch.NonOfficial.CrossPlat.yml@templates
@@ -75,6 +76,9 @@ extends:
7576 # Toolchain package tests should be run through the full package build, calculate the list of packages that should be re-tested
7677 # and make it available to the next stage via an output variable: 'CalculateToolchainPackageRetestList.toolchainPackageRetestList'
7778 - template : .pipelines/templates/ToolchainCalculatePackageRetests.yml@self
79+ parameters :
80+ # GCC fails to build as a regular package.
81+ ignoredSpecs : ["gcc"]
7882
7983 - script : echo "##vso[task.setvariable variable=toolchainArtifactName;isOutput=true]$(ob_artifactBaseName)"
8084 name : " ToolchainArtifactName"
@@ -100,9 +104,8 @@ extends:
100104 isCustom : true
101105 name : ${{ configuration.agentPool }}
102106 variables :
103- ob_artifactBaseName : ${{ variables. rpmsArtifactNameBase }} _${{ configuration.name }}_$(System.JobAttempt)
107+ ob_artifactBaseName : $( rpmsArtifactNameBase) _${{ configuration.name }}_$(System.JobAttempt)
104108 ob_outputDirectory : $(Build.ArtifactStagingDirectory)
105- testListFromToolchain : $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['CalculateToolchainPackageRetestList.toolchainPackageRetestList'] ]
106109 toolchainArtifactName : $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['ToolchainArtifactName.toolchainArtifactName'] ]
107110 steps :
108111 - template : .pipelines/templates/PackageBuild.yml@self
@@ -112,25 +115,62 @@ extends:
112115 isCheckBuild : true
113116 isQuickRebuildPackages : true
114117 isUseCCache : true
115- outputArtifactsFolder : $(ob_outputDirectory)
116118 maxCPU : " ${{ configuration.maxCPUs }}"
119+ outputArtifactsFolder : $(ob_outputDirectory)
117120 pipArtifactFeeds : " mariner/Mariner-Pypi-Feed"
118121 selfRepoName : self
119122 testSuiteName : " [${{ configuration.name }}] Package test"
120- testRerunList : " $(testListFromToolchain)"
121123
122124 - script : echo "##vso[task.setvariable variable=rpmsArtifactName;isOutput=true]$(ob_artifactBaseName)"
123125 name : " RPMsArtifactName"
124126 displayName : " Set variable for published artifact name"
125127
126128 - task : PublishPipelineArtifact@1
127129 inputs :
128- artifact : ${{ variables. rpmsArtifactNameBase }} _${{ configuration.name }}_$(System.JobAttempt)
130+ artifact : $( rpmsArtifactNameBase) _${{ configuration.name }}_$(System.JobAttempt)
129131 targetPath : $(ob_outputDirectory)
130132 condition : always()
131133 displayName : " Publish packages build artifacts"
132134
133- - stage : sodiff_${{ configuration.name }}
135+ - stage : Toolchain_tests_${{ configuration.name }}
136+ dependsOn : Toolchain_${{ configuration.name }}
137+ jobs :
138+ - job : TestToolchainPackages
139+ condition : stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['CalculateToolchainPackageRetestList.toolchainPackageRetestList']
140+ pool :
141+ type : linux
142+ isCustom : true
143+ name : ${{ configuration.agentPool }}
144+ variables :
145+ ob_artifactBaseName : $(toolchainTestsArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
146+ ob_outputDirectory : $(Build.ArtifactStagingDirectory)
147+ testListFromToolchain : $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['CalculateToolchainPackageRetestList.toolchainPackageRetestList'] ]
148+ toolchainArtifactName : $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['ToolchainArtifactName.toolchainArtifactName'] ]
149+ steps :
150+ - template : .pipelines/templates/PackageBuild.yml@self
151+ parameters :
152+ checkBuildRetries : " 1"
153+ customToolchainArtifactName : $(toolchainArtifactName)
154+ isAllowToolchainRebuilds : true
155+ isCheckBuild : true
156+ isQuickRebuildPackages : true
157+ isUseCCache : true
158+ maxCPU : " ${{ configuration.maxCPUs }}"
159+ outputArtifactsFolder : $(ob_outputDirectory)
160+ pipArtifactFeeds : " mariner/Mariner-Pypi-Feed"
161+ selfRepoName : self
162+ srpmPackList : " $(testListFromToolchain)"
163+ testRerunList : " $(testListFromToolchain)"
164+ testSuiteName : " [${{ configuration.name }}] Toolchain test"
165+
166+ - task : PublishPipelineArtifact@1
167+ inputs :
168+ artifact : $(toolchainTestsArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
169+ targetPath : $(ob_outputDirectory)
170+ condition : always()
171+ displayName : " Publish toolchain build artifacts"
172+
173+ - stage : Sodiff_${{ configuration.name }}
134174 dependsOn : RPMs_${{ configuration.name }}
135175 jobs :
136176 - job : Sodiff_Check
0 commit comments