1
1
variables :
2
- isMain : $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
2
+ - group : Linux_CI
3
+ - name : isMain
4
+ value : $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
3
5
4
6
trigger :
5
7
- main
@@ -15,129 +17,217 @@ pr:
15
17
pool :
16
18
vmImage : ' ubuntu-latest'
17
19
18
- jobs :
19
-
20
- - job : sync_branches_with_main
21
- condition : and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables.isMain, true))
22
- variables :
23
- BUILD_TYPE : sync_branches_with_main
24
- MAIN_BRANCH : $[ variables['Build.SourceBranchName'] ]
25
- CI : true
26
- steps :
27
- - checkout : self
28
- fetchDepth : 50
29
- clean : true
30
- persistCredentials : true
31
- - script : ./ci/travis/run-build.sh
32
- displayName : ' Sync Branches With Main Branch'
33
-
34
- - job : checkpatch
35
- condition : eq(variables['Build.Reason'], 'PullRequest')
36
- variables :
37
- BUILD_TYPE : checkpatch
38
- TARGET_BRANCH : $[ variables['System.PullRequest.TargetBranch'] ]
39
- COMMIT : $[ variables['Build.SourceVersion'] ]
40
- REPO_URL : $[ variables['Build.Repository.Uri'] ]
41
- steps :
42
- - checkout : none
43
- - script : |
44
- set -ex
45
- git init
46
- git remote add origin ${REPO_URL}
47
- git fetch --filter=tree:0 --no-tags origin ${COMMIT}
48
- git checkout --progress --force ${COMMIT}
49
- ./ci/travis/run-build.sh
50
- displayName: 'Checkpatch Script'
51
-
52
- - job : dt_binding_check
53
- condition : eq(variables['Build.Reason'], 'PullRequest')
54
- variables :
55
- BUILD_TYPE : dt_binding_check
56
- TARGET_BRANCH : $[ variables['System.PullRequest.TargetBranch'] ]
57
- COMMIT : $[ variables['Build.SourceVersion'] ]
58
- REPO_URL : $[ variables['Build.Repository.Uri'] ]
59
- UPSTREAM_REPO_URL : https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
60
- UPSTREAM_REPO_BRANCH : dt/next
61
- steps :
62
- - checkout : none
63
- - script : |
64
- set -ex
65
-
66
- git init
67
- git remote add origin ${REPO_URL}
68
- git fetch --progress --filter=tree:0 --no-tags origin ${COMMIT}
69
-
70
- git remote add upstream ${UPSTREAM_REPO_URL}
71
- git fetch --progress --depth=1 upstream ${UPSTREAM_REPO_BRANCH}
72
- git checkout --progress --force FETCH_HEAD
73
-
74
- git checkout ${COMMIT} -- ci/travis/
75
-
76
- ./ci/travis/run-build.sh
77
- displayName: 'Bindings Check Script'
78
-
79
- - job : check_new_file_license
80
- condition : eq(variables['Build.Reason'], 'PullRequest')
81
- variables :
82
- BUILD_TYPE : check_new_file_license
83
- TARGET_BRANCH : $[ variables['System.PullRequest.TargetBranch'] ]
84
- steps :
85
- - checkout : self
86
- fetchDepth : 50
87
- clean : true
88
- - script : ./ci/travis/run-build.sh
89
- displayName : ' Check Is New ADI Driver & Dual Licensed'
90
-
91
- - job : dtb_build_test
92
- variables :
93
- BUILD_TYPE : dtb_build_test
94
- DTS_FILES : " arch/arm/boot/dts/xilinx/zynq-*.dts
95
- arch/arm/boot/dts/intel/socfpga/socfpga_*.dts
96
- arch/arm64/boot/dts/xilinx/zynqmp-*.dts
97
- arch/arm64/boot/dts/xilinx/versal-*.dts
98
- arch/microblaze/boot/dts/*.dts
99
- arch/nios2/boot/dts/*.dts"
100
- steps :
101
- - checkout : self
102
- fetchDepth : 1
103
- clean : true
104
- - script : ./ci/travis/run-build.sh
105
- displayName : ' Device-Tree Build Test'
106
-
107
- - job : BuildDockerized
108
- strategy :
109
- matrix :
110
- zynq_adi_default :
111
- DEFCONFIG : zynq_xcomm_adv7511_defconfig
112
- ARCH : arm
113
- IMAGE : uImage
114
- CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT : 1
115
- socfpga_adi_default :
116
- DEFCONFIG : socfpga_adi_defconfig
117
- ARCH : arm
118
- IMAGE : zImage
119
- CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT : 1
120
- zynqmp_adi_default :
121
- DEFCONFIG : adi_zynqmp_defconfig
122
- ARCH : arm64
123
- IMAGE : Image
124
- CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT : 1
125
- versal_adi_default :
126
- DEFCONFIG : adi_versal_defconfig
127
- ARCH : arm64
128
- IMAGE : Image
129
- CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT : 1
130
- zynq_pluto :
131
- DEFCONFIG : zynq_pluto_defconfig
132
- ARCH : arm
133
- IMAGE : uImage
134
- zynq_m2k :
135
- DEFCONFIG : zynq_m2k_defconfig
136
- ARCH : arm
137
- IMAGE : uImage
138
- steps :
139
- - checkout : self
140
- fetchDepth : 1
141
- clean : true
142
- - script : ./ci/travis/run-build-docker.sh
143
- displayName : " Build test for '$(DEFCONFIG)'"
20
+ stages :
21
+ - stage : Build
22
+ jobs :
23
+ - job : sync_branches_with_main
24
+ condition : and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables.isMain, true))
25
+ variables :
26
+ BUILD_TYPE : sync_branches_with_main
27
+ MAIN_BRANCH : $[ variables['Build.SourceBranchName'] ]
28
+ CI : true
29
+ steps :
30
+ - checkout : self
31
+ fetchDepth : 50
32
+ clean : true
33
+ persistCredentials : true
34
+ - script : ./ci/travis/run-build.sh
35
+ displayName : ' Sync Branches With Main Branch'
36
+
37
+ - job : checkpatch
38
+ condition : eq(variables['Build.Reason'], 'PullRequest')
39
+ variables :
40
+ BUILD_TYPE : checkpatch
41
+ TARGET_BRANCH : $[ variables['System.PullRequest.TargetBranch'] ]
42
+ COMMIT : $[ variables['Build.SourceVersion'] ]
43
+ REPO_URL : $[ variables['Build.Repository.Uri'] ]
44
+ steps :
45
+ - checkout : none
46
+ - script : |
47
+ set -ex
48
+ git init
49
+ git remote add origin ${REPO_URL}
50
+ git fetch --filter=tree:0 --no-tags origin ${COMMIT}
51
+ git checkout --progress --force ${COMMIT}
52
+ ./ci/travis/run-build.sh
53
+ displayName: 'Checkpatch Script'
54
+
55
+ - job : dt_binding_check
56
+ condition : eq(variables['Build.Reason'], 'PullRequest')
57
+ variables :
58
+ BUILD_TYPE : dt_binding_check
59
+ TARGET_BRANCH : $[ variables['System.PullRequest.TargetBranch'] ]
60
+ COMMIT : $[ variables['Build.SourceVersion'] ]
61
+ REPO_URL : $[ variables['Build.Repository.Uri'] ]
62
+ UPSTREAM_REPO_URL : https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
63
+ UPSTREAM_REPO_BRANCH : dt/next
64
+ steps :
65
+ - checkout : none
66
+ - script : |
67
+ set -ex
68
+
69
+ git init
70
+ git remote add origin ${REPO_URL}
71
+ git fetch --progress --filter=tree:0 --no-tags origin ${COMMIT}
72
+
73
+ git remote add upstream ${UPSTREAM_REPO_URL}
74
+ git fetch --progress --depth=1 upstream ${UPSTREAM_REPO_BRANCH}
75
+ git checkout --progress --force FETCH_HEAD
76
+
77
+ git checkout ${COMMIT} -- ci/travis/
78
+
79
+ ./ci/travis/run-build.sh
80
+ displayName: 'Bindings Check Script'
81
+
82
+ - job : check_new_file_license
83
+ condition : eq(variables['Build.Reason'], 'PullRequest')
84
+ variables :
85
+ BUILD_TYPE : check_new_file_license
86
+ TARGET_BRANCH : $[ variables['System.PullRequest.TargetBranch'] ]
87
+ steps :
88
+ - checkout : self
89
+ fetchDepth : 50
90
+ clean : true
91
+ - script : ./ci/travis/run-build.sh
92
+ displayName : ' Check Is New ADI Driver & Dual Licensed'
93
+
94
+
95
+ - job : dtb_build_test
96
+ variables :
97
+ BUILD_TYPE : dtb_build_test
98
+ DTS_FILES : " arch/arm/boot/dts/xilinx/zynq-*.dts
99
+ arch/arm/boot/dts/intel/socfpga/socfpga_*.dts
100
+ arch/arm64/boot/dts/xilinx/zynqmp-*.dts
101
+ arch/arm64/boot/dts/xilinx/versal-*.dts
102
+ arch/nios2/boot/dts/*.dts"
103
+ steps :
104
+ - checkout : self
105
+ fetchDepth : 1
106
+ clean : true
107
+ - script : ./ci/travis/run-build.sh
108
+ displayName : ' Device-Tree Build Test'
109
+ - task : CopyFiles@2
110
+ inputs :
111
+ sourceFolder : ' $(Agent.BuildDirectory)/s/arch/arm/boot/dts'
112
+ contents : ' $(Agent.BuildDirectory)/s/arch/arm/boot/dts/?(*.dtb)'
113
+ targetFolder : ' $(Build.ArtifactStagingDirectory)'
114
+ - task : CopyFiles@2
115
+ inputs :
116
+ sourceFolder : ' $(Agent.BuildDirectory)/s/arch/arm64/boot/dts/xilinx'
117
+ contents : ' $(Agent.BuildDirectory)/s/arch/arm64/boot/dts/xilinx/?(*.dtb)'
118
+ targetFolder : ' $(Build.ArtifactStagingDirectory)'
119
+ - task : PublishPipelineArtifact@1
120
+ inputs :
121
+ targetPath : ' $(Build.ArtifactStagingDirectory)'
122
+ artifactName : ' DTBs'
123
+
124
+ - job : BuildDockerized
125
+ strategy :
126
+ matrix :
127
+ zynq_adi_default :
128
+ DEFCONFIG : zynq_xcomm_adv7511_defconfig
129
+ ARCH : arm
130
+ IMAGE : uImage
131
+ CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT : 1
132
+ socfpga_adi_default :
133
+ DEFCONFIG : socfpga_adi_defconfig
134
+ ARCH : arm
135
+ IMAGE : zImage
136
+ CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT : 1
137
+ zynqmp_adi_default :
138
+ DEFCONFIG : adi_zynqmp_defconfig
139
+ ARCH : arm64
140
+ IMAGE : Image
141
+ CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT : 1
142
+ versal_adi_default :
143
+ DEFCONFIG : adi_versal_defconfig
144
+ ARCH : arm64
145
+ IMAGE : Image
146
+ CHECK_ALL_ADI_DRIVERS_HAVE_BEEN_BUILT : 1
147
+ zynq_pluto :
148
+ DEFCONFIG : zynq_pluto_defconfig
149
+ ARCH : arm
150
+ IMAGE : uImage
151
+ zynq_m2k :
152
+ DEFCONFIG : zynq_m2k_defconfig
153
+ ARCH : arm
154
+ IMAGE : uImage
155
+ steps :
156
+ - checkout : self
157
+ fetchDepth : 1
158
+ clean : true
159
+ - script : ./ci/travis/run-build-docker.sh
160
+ displayName : " Build test for '$(DEFCONFIG)'"
161
+ - task : CopyFiles@2
162
+ inputs :
163
+ sourceFolder : ' $(Agent.BuildDirectory)/s/arch/arm/boot'
164
+ contents : ' [uz]Image'
165
+ targetFolder : ' $(Build.ArtifactStagingDirectory)'
166
+ - task : CopyFiles@2
167
+ inputs :
168
+ sourceFolder : ' $(Agent.BuildDirectory)/s/arch/arm64/boot'
169
+ contents : ' Image'
170
+ targetFolder : ' $(Build.ArtifactStagingDirectory)'
171
+ - task : PublishPipelineArtifact@1
172
+ inputs :
173
+ targetPath : ' $(Build.ArtifactStagingDirectory)/'
174
+ artifactName : ' $(DEFCONFIG)'
175
+
176
+ - stage : PushArtifacts
177
+ dependsOn : Build
178
+ variables :
179
+ SOURCE_DIRECTORY : $(Build.SourcesDirectory)/bin
180
+ jobs :
181
+ - job : Push_to_Artifactory
182
+ timeoutInMinutes : 90
183
+ pool :
184
+ name : Default
185
+ demands :
186
+ - agent.name -equals linux_default
187
+ condition : or(
188
+ and(
189
+ startsWith(variables['Build.SourceBranch'], 'refs/pull/'),
190
+ or(
191
+ eq(variables['System.PullRequest.TargetBranch'], 'main'),
192
+ eq(variables['System.PullRequest.TargetBranch'], 'next_stable'),
193
+ startsWith(variables['System.PullRequest.TargetBranch'], '202')
194
+ )
195
+ ),
196
+ or(
197
+ eq(variables['Build.SourceBranch'], 'refs/heads/main'),
198
+ eq(variables['Build.SourceBranch'], 'refs/heads/next_stable'),
199
+ startsWith(variables['Build.SourceBranch'], 'refs/heads/202')
200
+ )
201
+ )
202
+ steps :
203
+ - checkout : self
204
+ fetchDepth : 1
205
+ clean : true
206
+ - task : DownloadPipelineArtifact@2
207
+ inputs :
208
+ path : $(Build.SourcesDirectory)/bin
209
+ - bash : ./ci/travis/prepare_artifacts.sh
210
+ env :
211
+ ARTIFACTORY_PATH : $(ART_BASE_PATH)
212
+ ARTIFACTORY_TOKEN : $(ART_TOKEN)
213
+ name : PushArtifacts
214
+ displayName : " Push to Artifactory"
215
+
216
+ - stage : TestHarness
217
+ dependsOn : PushArtifacts
218
+ condition : succeeded()
219
+ jobs :
220
+ - job : Test
221
+ condition : ne(stageDependencies.PushArtifacts.Push_to_Artifactory.result, 'Skipped')
222
+ variables :
223
+ TIMESTAMP : $[ stageDependencies.PushArtifacts.Push_to_Artifactory.outputs['PushArtifacts.TIMESTAMP'] ]
224
+ BRANCH : $[ stageDependencies.PushArtifacts.Push_to_Artifactory.outputs['PushArtifacts.BRANCH'] ]
225
+ PR_ID : $[ stageDependencies.PushArtifacts.Push_to_Artifactory.outputs['PushArtifacts.PR_ID'] ]
226
+ steps :
227
+ - checkout : none
228
+ - script : |
229
+ curl $(JENKINS_URL)/job/Linux_TH/buildWithParameters \
230
+ --user $(JENKINS_USER):$(JENKINS_PASSWORD) \
231
+ --data TIMESTAMP=$(TIMESTAMP) \
232
+ --data BRANCH=$(BRANCH) \
233
+ --data PR_ID=$(PR_ID)
0 commit comments