blob: 7a9872528f0bac239104dcbe00e805eff96f2973 [file] [log] [blame]
Laurent Alfonsi9b9125f2023-02-24 17:25:48 +01001# Auto generated by ./tcwg/generate-yamlfiles.sh from tcwg_bmk.yaml.in and tcwg_bmk/tcwg_bmk-code_speed-cpu2017speed--gnu.def. Do not edit.
Laurent Alfonsi701c52f2023-02-16 11:38:46 +01002# Beware: git branch names need the 'refs/heads/' prefix, while tags need 'refs/tags/'
3- project:
Laurent Alfonsi9b9125f2023-02-24 17:25:48 +01004 name: tcwg_bmk-code_speed-cpu2017speed-gnu
Laurent Alfonsi701c52f2023-02-16 11:38:46 +01005 binutils_url: git://sourceware.org/git/binutils-gdb.git
Christophe Lyon9accb9d2024-10-17 09:10:19 +00006 gcc_url: https://gcc.gnu.org/git/gcc.git
Laurent Alfonsif12931b2024-07-01 18:26:03 +02007 linux_url: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable.git
Laurent Alfonsi0cacf302024-06-13 14:32:10 +02008 linux_branch: linux-rolling-stable
Laurent Alfonsi701c52f2023-02-16 11:38:46 +01009 glibc_url: git://sourceware.org/git/glibc.git
10
11 toolchain_name: gnu
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010012
13 # BMK defined in def files
14 bmk:
Laurent Alfonsi9b9125f2023-02-24 17:25:48 +010015 - cpu2017speed
16
17 target:
Maxim Kuvyrkov8dc04062023-05-18 14:51:29 +000018 - aarch64
Laurent Alfonsieaf47502023-03-09 11:09:05 +010019
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010020
Maxim Kuvyrkov4589cc32023-03-02 08:36:56 +000021 # PROFILE_NAME defined in def files
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010022 cflags:
23 - O2
24 - O2_LTO
25 - O3
26 - O3_LTO
Antoine Moynault17ab9382024-04-24 06:54:10 +000027 - Os
28 - Os_LTO
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010029
30 jobs:
31 - 'tcwg_bmk-gnu-master'
32
Laurent Alfonsi6375a162023-02-23 11:57:15 +010033
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010034- job-group:
35 name: tcwg_bmk-gnu-master
36 toolchain_ver: master
Laurent Alfonsi0cacf302024-06-13 14:32:10 +020037 binutils_branch: master
38 gcc_branch: master
39 glibc_branch: master
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010040 distro: default
41 cron_schedule: 'H H H/3 * *'
42 jobs:
Laurent Alfonsi9b9125f2023-02-24 17:25:48 +010043 - 'tcwg_bmk-code_speed-cpu2017speed--gnu-{target}-{toolchain_ver}-{cflags}-build'
44 - 'tcwg_bmk-code_speed-cpu2017speed--gnu-{target}-{toolchain_ver}-{cflags}-bisect'
45 ci_project: 'tcwg_bmk-code_speed-cpu2017speed'
46 ci_config: 'gnu-{target}-{toolchain_ver}-{cflags}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010047
48#BEGIN: tcwg/round-robin.yaml.inc
49# -*- mode: Yaml -*-
50
51#BEGIN: tcwg/default.yaml.inc
52# -*- mode: Yaml -*-
53
54- property:
55 name: default-properties
56 properties:
57 - authorization:
58 anonymous:
59 - job-read
60 - job-extended-read
61 everyone-flat:
62 - job-build
63 - job-cancel
64 - build-discarder:
Maxim Kuvyrkov5e1f6662025-02-20 05:32:41 +000065 days-to-keep: 20
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010066
67- scm:
68 name: jenkins-scripts
69 scm:
70 - git:
Laurent Alfonsi3c7c10a2025-04-17 17:04:51 +020071 url: https://gitlab.com/Linaro/tcwg/jenkins-scripts.git
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010072 refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*
73 branches:
74 - $scripts_branch
75 basedir: jenkins-scripts
76 skip-tag: true
77 reference-repo: /home/tcwg-buildslave/snapshots-ref/jenkins-scripts.git
78 wipe-workspace: false
79 clean:
80 before: true
81 prune: true
82
83- scm:
84 name: bmk-scripts
85 scm:
86 - git:
Laurent Alfonsi50d9de92025-05-27 13:04:04 +020087 url: https://gitlab.com/Linaro/tcwg/bmk-scripts.git
Laurent Alfonsi701c52f2023-02-16 11:38:46 +010088 refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*
89 branches:
90 - $bmk_branch
91 basedir: bmk-scripts
92 skip-tag: true
93 reference-repo: /home/tcwg-buildslave/snapshots-ref/bmk-scripts.git
94 wipe-workspace: false
95 clean:
96 before: true
97 prune: true
98#END: tcwg/default.yaml.inc
99
100- parameter:
101 name: default-parameters
102 parameters:
103 - string:
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100104 name: extra_build_params
105 default: ""
106 description: "Extra parameters to pass to the build script; can be used to override settings extracted from ci_project/ci_config"
107 - string:
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100108 name: distro
109 default: '{distro}'
110 description: 'Distro image to use'
111 - string:
112 name: scripts_branch
113 default: master
114 description: 'Scripts revision to use'
115 - string:
116 name: bmk_branch
117 default: master
118 description: 'Benchmark scripts revision to use'
119
120- parameter:
121 name: component-parameters
122 parameters:
123 - string:
124 name: '{component}_git'
125 default: '{default_git}'
Christophe Lyon1290bab2024-02-13 22:23:45 +0000126 description: "{component} git_url#branch/sha1 to build, or 'default', 'baseline' or 'jenkins-scm', or pw://series/<id> to build with patches from patchwork ('precommit' mode, use 'pw://series/<id>/retrigger/' to force a rebuild)"
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100127
128- parameter:
Maxim Kuvyrkovc81e4722023-11-22 18:11:33 +0000129 name: all-component-parameters
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100130 parameters:
131 - component-parameters:
132 component: binutils
133 default_git: '{default_git}'
134 - component-parameters:
135 component: gcc
136 default_git: '{default_git}'
137 - component-parameters:
138 component: glibc
139 default_git: '{default_git}'
140 - component-parameters:
141 component: linux
142 default_git: '{default_git}'
Maxim Kuvyrkovc81e4722023-11-22 18:11:33 +0000143
144- parameter:
145 name: build-parameters
146 parameters:
147 - all-component-parameters:
148 default_git: '{default_git}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100149 - choice:
150 name: update_baseline
151 choices:
152 - onsuccess
153 - force
154 - init
155 - ignore
156 description: "What to do with baseline in this build"
Maxim Kuvyrkov069813f2023-05-06 19:17:00 +0000157 - choice:
158 name: notify
159 choices:
160 - ignore
161 - onregression
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000162 - precommit
Maxim Kuvyrkov069813f2023-05-06 19:17:00 +0000163 description: "Whether to notify developers about the result of this build"
Laurent Alfonsi464db222024-05-28 14:09:45 +0200164 - string:
Laurent Alfonsi8527d662024-05-24 16:27:08 +0200165 name: rr_stage
166 default: build
167 description: "Describe the current round-robin stage for this run (informative only)"
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100168 - default-parameters:
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100169 distro: '{distro}'
170
Laurent Alfonsi87ab4de2024-04-25 07:34:20 +0200171
Laurent Alfonsi2ac30aa2023-08-23 16:13:37 +0200172- property:
173 name: build-properties
174 properties:
175 - default-properties
176 - build-blocker:
177 blocking-jobs:
178 - '{ci_project}--{ci_config}-bisect'
179 queue-scanning: 'ALL'
180
Maxim Kuvyrkovab90c432024-01-08 08:51:26 +0000181
Laurent Alfonsi2ac30aa2023-08-23 16:13:37 +0200182- property:
183 name: bisect-properties
184 properties:
185 - default-properties
186 - build-blocker:
187 # Run at most 1 bisect job for all configurations.
188 # Bisect jobs can easily run for 5+ hours, and a few of them
189 # can hog the entire TCWG build farm for a long time. Since
190 # same regression tends to appear in multiple configurations,
191 # run bisections for all configurations in-order.
192 blocking-jobs:
193 # We can't have same regressions between GNU and LLVM toolchains,
194 # do allow parallel bisections of those.
195 - '{ci_project}--gnu-.*-bisect'
196 queue-scanning: 'BUILDABLE'
197
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100198# Beware: git branch names need the 'refs/heads/' prefix while tags
199# need 'refs/tags/'.
200- scm:
201 name: component-scm
202 scm:
203 - git:
204 url: '{url}'
205 branches:
Laurent Alfonsi0cacf302024-06-13 14:32:10 +0200206 - 'refs/heads/{branch}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100207 basedir: '{component}'
Laurent Alfonsicdf084e2024-06-28 14:50:37 +0200208 do-not-fetch-tags: true
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100209 reference-repo: '/home/tcwg-buildslave/snapshots-ref/{reference}'
Laurent Alfonsi1ed7e3f2024-06-25 14:52:06 +0200210 refspec: '+refs/heads/{branch}:refs/remotes/origin/{branch}'
Laurent Alfonsi0cde2752024-06-13 14:32:10 +0200211 shallow-clone: true
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100212 wipe-workspace: false
213 clean:
214 before: true
215 prune: true
216
217# SCMs must start with jenkins-scripts and then be ordered alphabetically.
218# Same alphabetical order must be followed in .def files. The reason behind
219# this is that jenkins sets $GIT_COMMIT to sha1 of jenkins-scripts, and then
220# sets $GIT_COMMIT_1, $GIT_COMMIT_2, etc. to sha1s of component SCM /in the
221# order that they are declared here/.
222- scm:
223 name: build-scms
224 scm:
225 - jenkins-scripts
Laurent Alfonsi2d485072025-05-20 16:06:45 +0000226 - component-scm:
227 component: binutils
228 url: '{binutils_url}'
229 branch: '{binutils_branch}'
230 reference: binutils-gdb.git
231 - component-scm:
232 component: gcc
233 url: '{gcc_url}'
234 branch: '{gcc_branch}'
235 reference: gcc.git
236 - component-scm:
237 component: glibc
238 url: '{glibc_url}'
239 branch: '{glibc_branch}'
240 reference: glibc.git
241 - component-scm:
242 component: linux
243 url: '{linux_url}'
244 branch: '{linux_branch}'
245 reference: linux.git
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100246
247- wrapper:
248 name: build-wrappers
249 wrappers:
250 - timeout:
251 timeout: '{timeout}'
252 - timestamps
253 - ssh-agent-credentials:
254 # tcwg-buildslave user id
255 users:
256 - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
Christophe Lyonee8d3e82025-04-29 13:50:15 +0000257 - 'tcwg-buildslave-20220725'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100258 - credentials-binding:
259 - text:
260 credential-id: TCWG_JIRA_TOKEN
261 variable: TCWG_JIRA_TOKEN
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100262
263- builder:
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000264 name: trigger-followup-builds-1
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100265 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000266 - shell: |
267 #!/bin/bash
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000268 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000269 set -ex
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000270
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000271 for i in artifacts/trigger-build-* artifacts/trigger-bisect; do
272 if [ -f $i ]; then
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000273 echo "distro=$distro" >> $i
274 echo "scripts_branch=$scripts_branch" >> $i
275 echo "bmk_branch=$bmk_branch" >> $i
276 fi
277 done
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000278
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000279 trap "" EXIT
280
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000281- builder:
282 name: trigger-followup-builds-2
283 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000284 - trigger-builds:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000285 - project: '{ci_project}--{ci_config}-build'
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000286 parameter-factories:
287 - factory: filebuild
288 file-pattern: artifacts/trigger-build-*
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000289 - project: '{ci_project}--{ci_config}-bisect'
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000290 property-file: artifacts/trigger-bisect
Maxim Kuvyrkov12858ec2023-05-03 18:38:05 +0000291
292- builder:
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000293 name: run-build-notify
Maxim Kuvyrkov12858ec2023-05-03 18:38:05 +0000294 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000295 - shell: |
296 #!/bin/bash
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000297 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000298 set -ex
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100299
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000300 if [ -f artifacts/failed ]; then
Maxim Kuvyrkovab01ec02023-08-14 08:52:38 +0000301 # Only send notifications for forced successful
302 # (aka "onregression") builds; never for failed builds.
Laurent Alfonsia723e002023-10-02 15:25:05 +0200303 echo "Build failed. Using option notify=ignore."
Maxim Kuvyrkovab01ec02023-08-14 08:52:38 +0000304 notify=ignore
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000305 fi
Maxim Kuvyrkovb1f99992023-05-25 15:16:53 +0000306
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000307 # Basic notification -- create entry in interesting-commits.
Maxim Kuvyrkov835cfc22023-07-04 15:40:32 +0000308 # Note that we add --notify to the manifest -- we will need this
309 # later in round-robin-baseline.sh when re-writing history
310 # to update notifications files in interesting-commits and jira.
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000311 build_container_exec \
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +0000312 ./jenkins-scripts/rr/round-robin-notify.sh \
Maxim Kuvyrkov835cfc22023-07-04 15:40:32 +0000313 @@rr[top_artifacts] artifacts --notify "$notify" \
314 __stage init __verbose true \
Thiago Jung Bauermann676c14a2023-09-12 12:37:40 -0300315 __build_script {build_script} \
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000316 &> ./artifacts/jenkins/notify-init.log &
Maxim Kuvyrkov3966f7e2023-06-16 13:36:25 +0000317
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000318 if ! wait $!; then
319 echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \
320 > artifacts/jenkins/error-mail-recipients.txt
321 echo -e "$BUILD_URL\nERROR: notify-init failed\n" \
322 >> artifacts/jenkins/error-mail-body.txt
Laurent Alfonsi53446912023-09-10 15:14:16 +0200323 echo "ERROR: notify-init failed"
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000324 exit 1
325 fi
Maxim Kuvyrkov3966f7e2023-06-16 13:36:25 +0000326
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000327 # Full notification
328 echo "NOTE: Notify developers about this build"
Maxim Kuvyrkove8a19542023-12-26 10:12:55 +0000329
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000330 build_container_exec \
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +0000331 ./jenkins-scripts/rr/round-robin-notify.sh \
Maxim Kuvyrkove8a19542023-12-26 10:12:55 +0000332 @@rr[top_artifacts] artifacts __stage full __verbose true \
Thiago Jung Bauermann676c14a2023-09-12 12:37:40 -0300333 __build_script {build_script} \
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000334 &> ./artifacts/jenkins/notify-full.log &
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100335
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000336 if ! wait $!; then
337 echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \
338 > artifacts/jenkins/error-mail-recipients.txt
339 echo -e "$BUILD_URL\nERROR: notify-full failed\n" \
340 >> artifacts/jenkins/error-mail-body.txt
Laurent Alfonsi53446912023-09-10 15:14:16 +0200341 echo "ERROR: notify-full failed"
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000342 fi
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100343
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000344 # Failsafe for avoid spamming developers.
345 if [ "$notify" = "ignore" ] \
346 && [ -f artifacts/jenkins/mail-recipients.txt ]; then
347 echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \
348 > artifacts/jenkins/error-mail-recipients.txt
349 echo -e "$BUILD_URL\nERROR: tried to unexpectedly notify developers\n" \
350 >> artifacts/jenkins/error-mail-body.txt
351 mv artifacts/jenkins/mail-recipients.txt \
352 artifacts/jenkins/mail-recipients.bak
353 fi
Maxim Kuvyrkovdc5adc12023-07-01 08:02:24 +0000354
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000355 trap "" EXIT
356
Maxim Kuvyrkovdc5adc12023-07-01 08:02:24 +0000357- builder:
358 name: run-exit-on-failure
359 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000360 - shell: |
361 #!/bin/bash
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000362 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000363 set -ex
Maxim Kuvyrkov5a415222023-05-25 15:43:31 +0000364
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000365 if [ -f artifacts/failed ]; then
366 # Mark failed build as FAILURE; no further steps will run.
367 exit $(cat artifacts/failed)
368 fi
369 # Only successful builds run beyond this point.
Maxim Kuvyrkov909dfbe2023-05-06 19:56:28 +0000370
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000371 trap "" EXIT
372
Maxim Kuvyrkovb1f99992023-05-25 15:16:53 +0000373- builder:
374 name: run-push-baseline
375 builders:
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000376 - shell: |
377 #!/bin/bash
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000378 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000379 set -ex
Maxim Kuvyrkovb1f99992023-05-25 15:16:53 +0000380
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000381 # Update baseline branch of base-artifacts.
382 # If we made it this far, then the build is successful
383 # (possibly because it was forced to be declared successful).
384 if [ "$update_baseline" = "ignore" ]; then
Maxim Kuvyrkova5f21f42023-08-18 16:07:57 +0000385 trap "" EXIT
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000386 exit 0
387 fi
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100388
Laurent Alfonsie6cb4ea2024-04-26 15:15:08 +0200389 # We may need jira token while rewriting history.
Laurent Alfonsic7a40952024-04-26 19:44:08 +0200390 if [ -f $HOME/.jipdate.yml ]; then
Laurent Alfonsie6cb4ea2024-04-26 15:15:08 +0200391 (
392 # BE CAREFUL WITH TCWG_JIRA_TOKEN
393 set +x
394 build_container_exec \
395 sed -i -e "s/#TCWG_JIRA_TOKEN#/$TCWG_JIRA_TOKEN/" \
396 "$HOME/.jipdate.yml"
397 )
398 fi
399
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000400 build_container_exec \
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +0000401 ./jenkins-scripts/rr/round-robin-baseline.sh \
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000402 @@rr[top_artifacts] artifacts \
Maxim Kuvyrkov570e5ea2023-07-01 19:43:07 +0000403 __build_script {build_script} \
Maxim Kuvyrkove5b3c062023-07-01 12:45:48 +0000404 __push_base_artifacts true \
Maxim Kuvyrkov5e3db0f2023-07-01 12:46:59 +0000405 __rewrite_base_artifacts true \
Laurent Alfonsi87ab4de2024-04-25 07:34:20 +0200406 __commit_artifacts {commit_artifacts} \
Laurent Alfonsi9d6f3c82024-04-19 15:32:04 +0000407 __rewrite_num 100 \
Laurent Alfonsie2a36ca2024-11-04 13:04:24 +0100408 &> ./artifacts/jenkins/rewrite-{commit_artifacts}.log &
Maxim Kuvyrkovdbee9522023-05-06 19:39:52 +0000409
Maxim Kuvyrkovbdf8f062025-02-20 05:53:02 +0000410 res=0 && wait $! || res=$?
411
412 # Compress big files in artifacts/NN-* directories to save disk space
413 # on ci.linaro.org.
414 find artifacts/ -size +1M ! -name "*.xz" \
415 -path "artifacts/[0-9]*" -print0 \
Maxim Kuvyrkov2fc30f92025-02-20 23:33:00 +0000416 | xargs -0 -i@ xz -T0 @
Maxim Kuvyrkovbdf8f062025-02-20 05:53:02 +0000417
418 if [ $res != 0 ]; then
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000419 echo "maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org" \
420 > artifacts/jenkins/error-mail-recipients.txt
Maxim Kuvyrkov25379cc2024-03-28 07:30:27 +0000421 echo -e "$BUILD_URL\nERROR: round-robin-baseline.sh failed" \
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000422 >> artifacts/jenkins/error-mail-body.txt
Laurent Alfonsi53446912023-09-10 15:14:16 +0200423 echo "ERROR: round-robin-baseline.sh failed"
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000424 # We have failed to update the baseline, so let's fail and
425 # not notify developers.
426 exit 1
427 fi
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100428
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000429 trap "" EXIT
430
Laurent Alfonsia8284ec2023-11-16 10:05:38 +0100431- builder:
432 name: run-push-lnt-results
433 builders:
434 - trigger-builds:
Laurent Alfonsi1678ed72023-11-20 22:06:39 +0100435 - project: tcwg-update-lnt-results
Laurent Alfonsia8284ec2023-11-16 10:05:38 +0100436 predefined-parameters: |
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000437 ci_project={ci_project}
438 ci_config={ci_config}
Laurent Alfonsia8284ec2023-11-16 10:05:38 +0100439
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100440
441- builder:
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000442 name: run-build-init
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100443 builders:
444 - shell:
445 command: |
446 #!/bin/bash
447 set -ex
448 # Delete artifacts now to avoid re-using stale artifacts if
449 # below docker-run.sh fails to start up a container.
450 rm -rf artifacts/
451 mkdir -p artifacts/jenkins
452
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000453 build_name="#$BUILD_NUMBER"
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000454 echo "$build_name" > artifacts/jenkins/build-name
455
Laurent Alfonsia9572792024-10-24 12:00:20 +0200456 git -C jenkins-scripts submodule update --init --remote
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +0000457
Maxim Kuvyrkov5d4ddd82024-01-17 15:12:28 +0000458 if [ "{precommit}" = "True" ]; then
Maxim Kuvyrkov02987c12024-01-10 09:43:41 +0000459 cat >> artifacts/jenkins/run-build.env <<EOF
460 update_baseline=ignore
461 EOF
462 fi
463
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000464 cat >> artifacts/jenkins/run-build.env <<EOF
465 build_name="$build_name"
466 EOF
467 unstable-return: 125
468
469- builder:
470 name: run-build-skip-if-queue
471 builders:
472 - shell:
473 command: |
474 #!/bin/bash
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000475 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000476 set -ex
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000477
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100478 # Skip SCM-triggered builds if there are other builds in
479 # the queue. We need to process all pending bisection-triggered
480 # builds before fetching a new batch of upstream changes.
Maxim Kuvyrkovb4872112023-07-01 18:33:31 +0000481 # Re. skipping post-commit build if pre-commit queue is
482 # not empty -- it's just a favor to pre-commit builds.
Maxim Kuvyrkoveb378e42024-01-08 06:50:57 +0000483 if [ x"${{BUILD_CAUSE_SCMTRIGGER-false}}" = x"true" ] \
484 || [ x"${{BUILD_CAUSE_TIMERTRIGGER-false}}" = x"true" ]; then
Maxim Kuvyrkovb4872112023-07-01 18:33:31 +0000485 for job_type in build; do
Maxim Kuvyrkove8e49eb2023-07-01 18:52:20 +0000486 url="${{JOB_URL%-build/}}-$job_type"
Laurent Alfonsib81499a2025-01-06 15:32:36 +0100487 inQueue=$(curl --retry 5 --max-time 5 -s "$url/api/xml?tree=inQueue" \
Maxim Kuvyrkovb4872112023-07-01 18:33:31 +0000488 | sed -e "s#.*<inQueue>\(.*\)</inQueue>.*#\1#")
489 if [ "$inQueue" != "false" ]; then
490 echo "SKIP SCM BUILD"
491 touch artifacts/jenkins/skip-scm-build
492 build_name="$build_name-skip-scm-build"
493 echo "$build_name" > artifacts/jenkins/build-name
Maxim Kuvyrkov3782aea2023-05-25 15:24:41 +0000494
Maxim Kuvyrkovb4872112023-07-01 18:33:31 +0000495 # Mark build unstable aka a skipped build
496 exit 125
497 fi
498 done
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100499 fi
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000500
501 trap "" EXIT
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000502 unstable-return: 125
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100503
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000504- builder:
505 name: run-build-start-manifest
506 builders:
507 - shell:
508 command: |
509 #!/bin/bash
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000510 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000511 set -ex
Maxim Kuvyrkov8adf09b2023-07-01 15:47:55 +0000512
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000513 docker_opts=(
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000514 --distro $distro
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000515 --ssh_info true
Maxim Kuvyrkov843ba812024-09-30 06:24:27 +0000516 --node_labels "$NODE_LABELS"
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000517 )
518
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000519 ./jenkins-scripts/start-container-docker.sh --prefix build_ \
520 "${{docker_opts[@]}}" > build_container.sh
521 source build_container.sh
522 trap "cleanup_all_containers" EXIT
523
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000524 # Run the build script to fetch base-artifacts/, which are
525 # required to fetch baseline sources to apply patches to in
526 # pw-apply.sh below. This also initializes the build manifest
527 # with all below settings; we then import this manifest below.
528 #
529 # The parameter __finish_after makes the build script stop
530 # after fetching the baseline and "__" avoids saving this parameter
531 # in the manifest, so that we don't see this option in the main
532 # run of the build script below.
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000533 build_container_exec \
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000534 ./jenkins-scripts/{build_script} \
535 %%rr[top_artifacts] artifacts \
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000536 ==rr[ci_project] '{ci_project}' \
537 ==rr[ci_config] '{ci_config}' \
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000538 $extra_build_params \
539 --bmk_branch "$bmk_branch" \
540 --scripts_branch "$scripts_branch" \
541 ==rr[mode] "build" \
542 ==rr[update_baseline] "$update_baseline" \
543 --BUILD_URL "$BUILD_URL" \
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000544 __finish_at reset_artifacts
545
Laurent Alfonsiaf2d9852024-07-02 14:09:46 +0200546 echo "$rr_stage" > artifacts/rr_stage.txt
547
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000548 cat >> artifacts/jenkins/run-build.env <<EOF
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000549 docker_opts=(${{docker_opts[@]+$(printf "%q$IFS" "${{docker_opts[@]}}")}})
550 source build_container.sh
551 trap "cleanup_all_containers" EXIT
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000552 EOF
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000553
554 # Now that we have "trap cleanup_all_containers EXIT" in
555 # run-build.env we need to reset the trap at the end of every
556 # step to preserve container[s] for the next step.
557 trap "" EXIT
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000558 unstable-return: 125
559
560- builder:
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000561 name: run-build-process-params
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000562 builders:
563 - shell:
564 command: |
565 #!/bin/bash
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000566 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000567 set -ex
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000568
569 branch_opt=()
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100570 # 1 to skip jenkins-scripts
571 i=1
Maxim Kuvyrkov55290762024-01-05 15:47:34 +0000572 for c in binutils gcc glibc linux; do
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100573 eval "g=\$$$${{c}}_git"
574 if [ x"$g" = x"default" ]; then
Maxim Kuvyrkoveb378e42024-01-08 06:50:57 +0000575 if [ x"${{BUILD_CAUSE_SCMTRIGGER-false}}" = x"true" ] \
576 || [ x"${{BUILD_CAUSE_TIMERTRIGGER-false}}" = x"true" ]; then
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100577 g="jenkins-scm"
578 else
579 g="baseline"
580 fi
581 fi
582 if [ x"$g" = x"jenkins-scm" ]; then
Laurent Alfonsi2d485072025-05-20 16:06:45 +0000583 eval "gb=\$GIT_BRANCH_$i"
584 gb=$(echo $gb | sed 's+origin/++')
585 eval "g=\$GIT_URL_$i#$gb"
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100586 fi
587 i=$(($i+1))
Maxim Kuvyrkovbc309d52023-05-25 16:08:50 +0000588
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100589 if [ x"$g" != x"baseline" ]; then
590 build_name="$build_name-$c"
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000591 branch_opt+=("==rr[${{c}}_git]" "$g")
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100592 fi
593 done
594
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000595 echo "$build_name" > artifacts/jenkins/build-name
596
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000597 cat >> artifacts/jenkins/run-build.env <<EOF
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000598 build_name="$build_name"
Maxim Kuvyrkovfcbaf902023-07-01 19:20:46 +0000599 branch_opt=(${{branch_opt[@]+$(printf "%q$IFS" "${{branch_opt[@]}}")}})
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000600 EOF
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000601
602 trap "" EXIT
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000603 unstable-return: 125
604
605- builder:
606 name: run-build-main
607 builders:
608 - shell:
609 command: |
610 #!/bin/bash
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000611 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000612 set -ex
Maxim Kuvyrkov3a78c872023-05-28 10:25:15 +0000613
Maxim Kuvyrkov86efb0b2023-05-29 09:58:03 +0000614 # Run the build script to from the manifest created above.
615 #
616 # The parameter __start_at makes the build script start right
617 # where the above run finished. This allows us to use read-only
618 # bind-mount for base-artifacts/, which, otherwise, may require
619 # multi-gig rsync.
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000620 build_container_exec \
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100621 ./jenkins-scripts/{build_script} \
Maxim Kuvyrkov8da7e852023-05-25 16:26:30 +0000622 @@rr[top_artifacts] artifacts \
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000623 "${{branch_opt[@]}}" \
Maxim Kuvyrkov86efb0b2023-05-29 09:58:03 +0000624 __start_at reset_artifacts+ &
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100625 res=0 && wait $! || res=$?
626
Maxim Kuvyrkov5a415222023-05-25 15:43:31 +0000627 # Update build_name
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000628 if [ -f artifacts/results ]; then
629 build_name="$build_name-R$(tail -n1 artifacts/results)"
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100630 fi
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000631 if [ "$update_baseline" != "onsuccess" ]; then
632 build_name="$build_name-$update_baseline"
633 fi
634
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100635 if [ -f artifacts/trigger-bisect ]; then
636 build_name="$build_name-trigger-bisect"
637 fi
638 echo "$build_name" > artifacts/jenkins/build-name
Maxim Kuvyrkov5a415222023-05-25 15:43:31 +0000639
640 # Everything but 0 and $INTERNAL_FAILURE is an unexpected exit code,
641 # so stop here and do nothing else. From jenkins point of view ...
642 # - if $res==0: build is successful, so proceed with all
643 # followup steps -- notify, push, trigger precommit.
644 # - if $res==123: build has a regression, so proceed with triggering
645 # followup builds and sending precommit notifications; but stop
646 # before run-push-baseline by checking artifacts/failed.
647 # - if $res is anything else: build has an unexpected failure, so
648 # skip the rest of the steps by setting UNSTABLE build status.
649 # This will cause all followup conditional-steps to skip due to
650 # "current-status" condition.
651 #
652 # See comment before round-robin.sh:check_regression() for details.
653 case $res in
Maxim Kuvyrkov8441bde2023-06-30 16:07:03 +0000654 0)
655 ;;
Maxim Kuvyrkov5a415222023-05-25 15:43:31 +0000656 123)
657 echo 123 > artifacts/failed
658 ;;
659 *)
660 res=125
661 ;;
662 esac
663
664 if [ $res = 125 ]; then
665 # We had unexpected failure in the build scripts, so can't
666 # proceed with triggers and notifications. Mark this build
667 # as UNSTABLE, which will skip all following conditional-steps.
668 exit 125
669 fi
Maxim Kuvyrkov307e26e2023-08-11 10:41:28 +0000670
671 cat >> artifacts/jenkins/run-build.env <<EOF
672 build_name="$build_name"
673 EOF
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000674
675 trap "" EXIT
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100676 unstable-return: 125
Maxim Kuvyrkovac7ff472023-06-28 07:35:50 +0000677
678- builder:
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000679 name: run-build-fini
680 builders:
681 - shell:
682 command: |
683 #!/bin/bash
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000684 source artifacts/jenkins/run-build.env
Maxim Kuvyrkov8c8e4aa2023-11-22 18:56:53 +0000685 set -ex
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000686 # The "trap cleanup_all_containers EXIT" statement in
687 # artifacts/jenkins/run-build.env will remove build and precommit
688 # containers.
689
690- builder:
Maxim Kuvyrkovac7ff472023-06-28 07:35:50 +0000691 name: run-build
692 builders:
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000693 - conditional-step:
694 condition-kind: current-status
695 steps:
Maxim Kuvyrkov5deb8a82023-06-30 13:51:06 +0000696 - run-build-init:
Maxim Kuvyrkov02987c12024-01-10 09:43:41 +0000697 precommit: false
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000698 - build-name-setter:
699 name: 'artifacts/jenkins/build-name'
700 file: true
701 - conditional-step:
702 condition-kind: current-status
703 steps:
Maxim Kuvyrkov5deb8a82023-06-30 13:51:06 +0000704 - run-build-skip-if-queue:
705 dummy: dummy
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000706 - build-name-setter:
707 name: 'artifacts/jenkins/build-name'
708 file: true
709 - conditional-step:
710 condition-kind: current-status
711 steps:
712 - run-build-start-manifest:
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000713 ci_project: '{ci_project}'
714 ci_config: '{ci_config}'
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000715 build_script: '{build_script}'
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000716 - build-name-setter:
717 name: 'artifacts/jenkins/build-name'
718 file: true
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000719 - conditional-step:
720 condition-kind: current-status
721 steps:
Maxim Kuvyrkovd3bf8272023-06-28 17:51:53 +0000722 - run-build-process-params:
Maxim Kuvyrkov55290762024-01-05 15:47:34 +0000723 dummy: dummy
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000724 - build-name-setter:
725 name: 'artifacts/jenkins/build-name'
726 file: true
727 - conditional-step:
728 condition-kind: current-status
729 steps:
Laurent Alfonsi87ab4de2024-04-25 07:34:20 +0200730 - run-push-baseline:
731 build_script: '{build_script}'
Laurent Alfonsi5a667f72024-04-25 14:49:44 +0200732 commit_artifacts: 'false'
Laurent Alfonsi87ab4de2024-04-25 07:34:20 +0200733 - conditional-step:
734 condition-kind: current-status
735 steps:
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000736 - run-build-main:
737 build_script: '{build_script}'
738 - build-name-setter:
739 name: 'artifacts/jenkins/build-name'
740 file: true
741 - conditional-step:
742 condition-kind: current-status
743 steps:
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000744 - trigger-followup-builds-1:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000745 dummy: dummy
Maxim Kuvyrkovccd89ea2023-06-30 17:16:10 +0000746 - trigger-followup-builds-2:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000747 ci_project: '{ci_project}'
748 ci_config: '{ci_config}'
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000749 - build-name-setter:
750 name: 'artifacts/jenkins/build-name'
751 file: true
752 - conditional-step:
753 condition-kind: current-status
754 steps:
Maxim Kuvyrkov333b2962023-08-14 08:55:46 +0000755 - run-build-notify:
Thiago Jung Bauermann676c14a2023-09-12 12:37:40 -0300756 build_script: '{build_script}'
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000757 - build-name-setter:
758 name: 'artifacts/jenkins/build-name'
759 file: true
760 - conditional-step:
761 condition-kind: current-status
762 steps:
Maxim Kuvyrkovdc5adc12023-07-01 08:02:24 +0000763 - run-exit-on-failure:
764 dummy: dummy
765 - build-name-setter:
766 name: 'artifacts/jenkins/build-name'
767 file: true
768 - conditional-step:
769 condition-kind: current-status
770 steps:
Maxim Kuvyrkov5deb8a82023-06-30 13:51:06 +0000771 - run-push-baseline:
Maxim Kuvyrkov570e5ea2023-07-01 19:43:07 +0000772 build_script: '{build_script}'
Laurent Alfonsiaa30fa72024-04-26 10:53:34 +0200773 commit_artifacts: 'true'
Laurent Alfonsia8284ec2023-11-16 10:05:38 +0100774 - conditional-step:
775 condition-kind: current-status
776 steps:
777 - run-push-lnt-results:
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000778 ci_project: '{ci_project}'
779 ci_config: '{ci_config}'
Maxim Kuvyrkov99695092023-06-28 09:52:05 +0000780 - build-name-setter:
781 name: 'artifacts/jenkins/build-name'
782 file: true
Maxim Kuvyrkov3ab321b2023-08-14 08:28:29 +0000783 - conditional-step:
784 condition-kind: current-status
785 steps:
786 - run-build-fini:
787 dummy: dummy
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100788
Maxim Kuvyrkovac7ff472023-06-28 07:35:50 +0000789
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100790- publisher:
791 name: build-publishers
792 publishers:
793 - archive:
794 artifacts: 'artifacts/**'
Laurent Alfonsiaa30fa72024-04-26 10:53:34 +0200795 latest-only: false
Laurent Alfonsicbf9a992023-11-23 16:09:27 +0100796 - html-publisher:
797 name: 'HTML Report'
798 dir: 'artifacts/jenkins'
799 files: 'status.html'
800 keep-all: true
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100801 - email-ext:
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100802 recipients: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +0000803 ${{FILE,path="artifacts/jenkins/mail-recipients.txt"}}
804 reply-to: linaro-toolchain@lists.linaro.org
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100805 subject: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +0000806 ${{FILE,path="artifacts/jenkins/mail-subject.txt"}}
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100807 content-type: text
808 body: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +0000809 ${{FILE,path="artifacts/jenkins/mail-body.txt"}}
810 failure: {email_on_failure}
811 success: {email_on_success}
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100812 aborted: false
813 send-to:
814 - recipients
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100815 - email-ext:
816 recipients: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +0000817 ${{FILE,path="artifacts/jenkins/error-mail-recipients.txt"}}
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100818 body: |
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +0000819 ${{FILE,path="artifacts/jenkins/error-mail-body.txt"}}
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100820 failure: true
821 success: true
822 aborted: true
823 send-to:
824 - recipients
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100825
826- parameter:
827 name: bisect-parameters
828 parameters:
829 - string:
830 name: current_project
831 default: ""
832 description: "Project to bisect"
833 - string:
834 name: bad_git
835 default: ""
836 description: "Bad git_url#branch/SHA1"
837 - file:
838 name: jenkins-scripts/replay_log
839 description: "Replay part of bisect using provided bisect log"
840 - default-parameters:
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100841 distro: '{distro}'
842
843- wrapper:
844 name: bisect-wrappers
845 wrappers:
846 - build-wrappers:
847 timeout: '{timeout}'
848
849- builder:
850 name: run-bisect
851 builders:
852 - shell:
853 command: |
854 #!/bin/bash
855 set -ex
856 # Delete artifacts now to avoid re-using stale artifacts if
857 # below docker-run.sh fails to start up a container.
858 rm -rf artifacts/
859 mkdir -p artifacts/jenkins
860 build_name="#$BUILD_NUMBER-$current_project"
861 echo "$build_name" > artifacts/jenkins/build-name
862
Maxim Kuvyrkov1fbec982023-07-01 18:39:54 +0000863 cat >> artifacts/jenkins/run-build.env <<EOF
864 build_name="$build_name"
865 EOF
866
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100867 ./jenkins-scripts/docker-run.sh \
868 --distro $distro \
869 --ssh_info true \
Maxim Kuvyrkov843ba812024-09-30 06:24:27 +0000870 --node_labels "$NODE_LABELS" \
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100871 -- \
Maxim Kuvyrkovd2207ec2024-06-28 14:10:30 +0000872 ./jenkins-scripts/rr/round-robin-bisect.sh \
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100873 %%rel_artifacts artifacts \
874 --BUILD_URL "$BUILD_URL" \
875 --current_project "$current_project" \
876 --bad_git "$bad_git" \
877 --replay_log "$(pwd)/jenkins-scripts/replay_log" \
878 --build_script "./jenkins-scripts/{build_script}" \
879 -- \
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000880 ==rr[ci_project] '{ci_project}' \
881 ==rr[ci_config] '{ci_config}' \
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100882 $extra_build_params \
883 --bmk_branch "$bmk_branch" \
884 --scripts_branch "$scripts_branch" &
885 res=0 && wait $! || res=$?
886
887 if [ $res != 0 ]; then
888 echo $res > artifacts/failed
889 fi
890 unstable-return: 125
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000891 - build-name-setter:
892 name: 'artifacts/jenkins/build-name'
893 file: true
Maxim Kuvyrkovb9fe6a92023-05-29 15:15:14 +0000894 - conditional-step:
Maxim Kuvyrkovb9fe6a92023-05-29 15:15:14 +0000895 condition-kind: current-status
896 steps:
Maxim Kuvyrkovc4245672023-06-30 17:22:57 +0000897 - trigger-followup-builds-1:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000898 dummy: dummy
Maxim Kuvyrkovc4245672023-06-30 17:22:57 +0000899 - trigger-followup-builds-2:
Maxim Kuvyrkov52c3cc22024-01-05 15:40:26 +0000900 ci_project: '{ci_project}'
901 ci_config: '{ci_config}'
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000902 - conditional-step:
903 condition-kind: current-status
904 steps:
905 - shell: |
906 #!/bin/bash
907 set -ex
Maxim Kuvyrkovb9fe6a92023-05-29 15:15:14 +0000908
Maxim Kuvyrkov7b799fb2023-06-28 16:01:34 +0000909 if [ -f artifacts/failed ]; then
910 # Mark failed build as FAILURE; no further steps will run.
911 exit $(cat artifacts/failed)
912 fi
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100913
914- publisher:
915 name: bisect-publishers
916 publishers:
917 - archive:
918 artifacts: 'artifacts/**'
919 latest-only: false
920 - email-ext:
921 recipients: |
922 maxim.kuvyrkov@linaro.org, laurent.alfonsi@linaro.org
923 failure: true
924 success: false
925 aborted: true
926 send-to:
927 - recipients
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100928#END: tcwg/round-robin.yaml.inc
929
930- job-template:
Laurent Alfonsi9b9125f2023-02-24 17:25:48 +0100931 name: tcwg_bmk-code_speed-cpu2017speed--gnu-{target}-{toolchain_ver}-{cflags}-build
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100932 project-type: freestyle
933 defaults: global
934 properties:
Laurent Alfonsi2ac30aa2023-08-23 16:13:37 +0200935 - build-properties:
936 ci_project: '{ci_project}'
937 ci_config: '{ci_config}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100938 parameters:
939 - build-parameters:
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100940 default_git: 'default'
941 distro: '{distro}'
Maxim Kuvyrkov186ad342023-09-07 12:08:44 +0000942 # We are waiting for tcwg-bmk-apm-* machines to get PDU control,
943 # so that we can recover from crashes.
944 # See https://linaro.atlassian.net/browse/STG-4212 .
945 disabled: true
Laurent Alfonsie4ee67e2025-01-16 14:53:21 +0100946 node: tcwg-build_bmk && tcwg-armv8_64
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100947 concurrent: false
Laurent Alfonsi6375a162023-02-23 11:57:15 +0100948 display-name: 'TCWG Build {ci_project}--{ci_config}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100949 workspace: workspace/tcwg_bmk_$EXECUTOR_NUMBER
950 scm:
951 - build-scms:
952 binutils_url: '{binutils_url}'
953 binutils_branch: '{binutils_branch}'
954 gcc_url: '{gcc_url}'
955 gcc_branch: '{gcc_branch}'
956 linux_url: '{linux_url}'
957 linux_branch: '{linux_branch}'
958 glibc_url: '{glibc_url}'
959 glibc_branch: '{glibc_branch}'
960 triggers:
961 - pollscm:
962 cron: '{cron_schedule}'
963 wrappers:
964 - build-wrappers:
965 timeout: 600
966 builders:
967 - run-build:
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000968 ci_project: '{ci_project}'
969 ci_config: '{ci_config}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100970 build_script: 'tcwg_bmk-build.sh'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100971 publishers:
Maxim Kuvyrkovf2ea7b72023-08-16 07:59:14 +0000972 - build-publishers:
973 email_on_failure: false
974 email_on_success: true
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100975
976- job-template:
Laurent Alfonsi9b9125f2023-02-24 17:25:48 +0100977 name: tcwg_bmk-code_speed-cpu2017speed--gnu-{target}-{toolchain_ver}-{cflags}-bisect
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100978 project-type: freestyle
979 defaults: global
980 properties:
Laurent Alfonsi2ac30aa2023-08-23 16:13:37 +0200981 - bisect-properties:
982 ci_project: '{ci_project}'
983 ci_config: '{ci_config}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100984 parameters:
985 - bisect-parameters:
986 distro: '{distro}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100987 disabled: false
Laurent Alfonsie4ee67e2025-01-16 14:53:21 +0100988 node: tcwg-build_bmk && tcwg-armv8_64
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100989 concurrent: false
Laurent Alfonsi6375a162023-02-23 11:57:15 +0100990 display-name: 'TCWG Bisect {ci_project}--{ci_config}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100991 workspace: workspace/tcwg_bmk_$EXECUTOR_NUMBER
992 scm:
993 - jenkins-scripts
Laurent Alfonsi701c52f2023-02-16 11:38:46 +0100994 wrappers:
995 - bisect-wrappers:
996 timeout: 2880
997 builders:
998 - run-bisect:
Maxim Kuvyrkov67698ea2024-01-05 15:26:07 +0000999 ci_project: '{ci_project}'
1000 ci_config: '{ci_config}'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +01001001 build_script: 'tcwg_bmk-build.sh'
Laurent Alfonsi701c52f2023-02-16 11:38:46 +01001002 publishers:
1003 - bisect-publishers
Laurent Alfonsi9da56d82025-03-27 07:16:00 +01001004
Laurent Alfonsi50d9de92025-05-27 13:04:04 +02001005# checksum: 187f3e41479116fb628d2ef35b672628