blob: 78255eee5b62fd7fc65375d9a36190a677fef43a [file] [log] [blame]
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +00001# Auto generated by ./tcwg/generate-yamlfiles.sh from tcwg-dev-build.yaml.in and tcwg-dev-build/tcwg-llvm-build.def. Do not edit.
2#BEGIN: tcwg/default.yaml.inc
3# -*- mode: Yaml -*-
4
5- property:
6 name: default-properties
7 properties:
8 - authorization:
9 anonymous:
10 - job-read
11 - job-extended-read
Benjamin Copeland9dc2eb82022-10-11 12:40:33 +010012 everyone-flat:
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +000013 - job-build
14 - job-cancel
15 - build-discarder:
Maxim Kuvyrkov5e1f6662025-02-20 05:32:41 +000016 days-to-keep: 20
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +000017
18- scm:
19 name: jenkins-scripts
20 scm:
21 - git:
Laurent Alfonsi3c7c10a2025-04-17 17:04:51 +020022 url: https://gitlab.com/Linaro/tcwg/jenkins-scripts.git
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +000023 refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*
24 branches:
25 - $scripts_branch
26 basedir: jenkins-scripts
27 skip-tag: true
28 reference-repo: /home/tcwg-buildslave/snapshots-ref/jenkins-scripts.git
29 wipe-workspace: false
30 clean:
31 before: true
32 prune: true
33
34#END: tcwg/default.yaml.inc
35
36- job:
37 name: tcwg-llvm-build
38 project-type: freestyle
39 defaults: global
40 properties:
41 - default-properties
42 parameters:
43 - string:
44 name: release
45 default: ''
46 description: 'Release number. Ex. 4.0.1'
47 - string:
48 name: candidate
49 default: 'git-ref=main'
50 description: 'RC number. Ex. 1, 2, final'
51 - string:
52 name: toolchain
53 default: ''
54 description: 'URL of the toolchain to use. This needs to be a tarball with a /bin directory inside with either GCC or LLVM from make install'
55 - string:
56 name: compiler
57 default: 'clang'
58 description: 'Override the default system compiler. Only used if "toolchain" is empty.'
59 - bool:
60 name: useninja
61 default: true
62 description: 'Whether or not to use ninja for the release (works for releases > 9.0.0)'
63 - bool:
64 name: testsuite
65 default: true
66 description: 'Whether or not to trigger a test-suite with this build.'
67 - string:
68 name: build_container_tag
69 default: 'lts_1'
Maxim Kuvyrkov4db270a2022-09-05 17:10:55 +000070 description: 'Type of image to use in the container: lts_1, lts, ...'
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +000071 - label:
72 name: builder
73 default: tcwg-x86_64-build
74 description: 'Jenkins label to build on; determines host of the toolchain'
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +000075 - string:
76 name: scripts_branch
77 default: tested
78 description: 'Scripts revision to use'
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +000079 disabled: false
80 concurrent: true
Maxim Kuvyrkov2cfd7c72021-09-01 13:06:44 +000081 display-name: 'TCWG AAA llvm linux Build'
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +000082 scm:
83 - jenkins-scripts
84 wrappers:
85 - timeout:
86 timeout: 1800
87 - timestamps
88 - ssh-agent-credentials:
89 # tcwg-buildslave user id
90 users:
91 - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
92 - build-name:
93 name: '#$BUILD_NUMBER-$release-$candidate/$builder'
Maxim Kuvyrkovd384b672021-09-01 11:58:39 +000094 - workspace-cleanup
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +000095 builders:
96 - shell: |
97 #!/bin/bash
98
99 set -ex
100
101 rm -rf artifacts
102 mkdir artifacts
103
104 # Until we figure out a way to use heavy-job with different weights
105 # based on the builder, we hardcode to one.
106 buildjobs=1
107
108 # Select builder arch/type/container
109 case ${builder} in
110 tcwg-x86_64-build|tcwg-x86_64-cam)
111 builder_arch=amd64
112 buildjobs=8 # 1 slot is 32/4
113 ;;
114 tcwg-tk1_32-build|tcwg-llvm_tk1-*)
115 builder_arch=armhf
116 buildjobs=3 # TK1s only have 4 cores and little RAM
117 ;;
118 tcwg-jade*)
119 builder_arch=arm64
120 buildjobs=64 # Jades have lots of cores
121 ;;
122 *) echo "ERROR: Unsupported label: $builder"; exit 1 ;;
123 esac
124
125 # Sets the system compiler
126 compiler_option=''
127 if [ "${toolchain:+set}" != "set" ] && [ "${compiler:+set}" = "set" ]; then
128 compiler_option="--compiler=${compiler}"
129 fi
130
131 # Trigger toolchain name
132 toolchain_file="${WORKSPACE}/llvm.params.toolchain"
133 toolchain_file_option=""
134 if ${twostage} || ${testsuite}; then
135 toolchain_file_option="--toolchain-file=$toolchain_file"
136 fi
137
138 # Setup job parameters and run (for now, just pretend to run)
139 ret=0
Maxim Kuvyrkovd384b672021-09-01 11:58:39 +0000140 ./jenkins-scripts/docker-run.sh \
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +0000141 --arch ${builder_arch} \
142 --distro ${build_container_tag} \
143 -- \
Maxim Kuvyrkovc9510362021-09-01 11:46:22 +0000144 bash -x ./jenkins-scripts/tcwg-llvm-release.sh \
Maxim Kuvyrkov33b02832021-09-01 11:12:35 +0000145 --workspace=${WORKSPACE} \
146 --release=${release} \
147 --candidate=${candidate} \
148 --buildjobs=${buildjobs} \
149 --toolchain=${toolchain} \
150 --use-ninja=${useninja} \
151 $toolchain_file_option $compiler_option \
152 > artifacts/release.log 2>&1 || ret=$?
153
154 if [ $ret -ne 0 ]; then
155 touch llvm.failed
156 fi
157
158 # Chained jobs
159 if ${testsuite}; then
160 echo "target_list=$builder" > llvm.params.testsuite
161 cat $toolchain_file >> llvm.params.testsuite
162 fi
163
164 # failure is handled by conditional step on llvm.failed
165 # so that the testsuite job is always triggered
166 exit 0
167 - conditional-step:
168 condition-kind: file-exists
169 condition-filename: llvm.params.testsuite
170 steps:
171 - trigger-builds:
172 - project: 'tcwg-llvm-testsuite'
173 property-file: llvm.params.testsuite
174 current-parameters: true
175 block: true
176 - conditional-step:
177 condition-kind: file-exists
178 condition-filename: llvm.failed
179 steps:
180 - shell: "exit 1"
181 publishers:
182 - archive:
183 artifacts: 'artifacts/**'
184 latest-only: false
Laurent Alfonsi3c7c10a2025-04-17 17:04:51 +0200185# checksum: b572df8347320fc6fd64b8b3c89df1d9