blob: 28d0cc19e66a2bd196342c11595d7e92307d17a3 [file] [log] [blame]
Patrick Williams864cc432023-02-09 14:54:44 -06001image: ghcr.io/siemens/kas/kas:3.2
Brad Bishopbec4ebc2022-08-03 09:55:16 -04002
Andrew Geissler517393d2023-01-13 08:55:19 -06003variables:
4 CPU_REQUEST: ""
5 DEFAULT_TAG: ""
Andrew Geissler9347dd42023-03-03 12:38:41 -06006 CACHE_DIR: $CI_BUILDS_DIR/persist
Andrew Geissler517393d2023-01-13 08:55:19 -06007 # These are needed as the k8s executor doesn't respect the container entrypoint
8 # by default
9 FF_KUBERNETES_HONOR_ENTRYPOINT: 1
10 FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 0
11
Brad Bishopbec4ebc2022-08-03 09:55:16 -040012stages:
13 - prep
14 - build
15
16# Common job fragment to get a worker ready
17.setup:
Andrew Geissler517393d2023-01-13 08:55:19 -060018 tags:
19 - $DEFAULT_TAG
Brad Bishopbec4ebc2022-08-03 09:55:16 -040020 stage: build
21 interruptible: true
22 variables:
23 KAS_WORK_DIR: $CI_PROJECT_DIR/work
Andrew Geissler9347dd42023-03-03 12:38:41 -060024 KAS_REPO_REF_DIR: $CACHE_DIR/repos
25 SSTATE_DIR: $CACHE_DIR/sstate
26 DL_DIR: $CACHE_DIR/downloads
Brad Bishopbec4ebc2022-08-03 09:55:16 -040027 BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
Andrew Geissler9347dd42023-03-03 12:38:41 -060028 TOOLCHAIN_DIR: $CACHE_DIR/toolchains
Brad Bishopbec4ebc2022-08-03 09:55:16 -040029 IMAGE_DIR: $CI_PROJECT_DIR/work/build/tmp/deploy/images
30 TOOLCHAIN_LINK_DIR: $CI_PROJECT_DIR/work/build/toolchains
31 before_script:
32 - echo KAS_WORK_DIR = $KAS_WORK_DIR
33 - echo SSTATE_DIR = $SSTATE_DIR
34 - echo DL_DIR = $DL_DIR
35 - rm -rf $KAS_WORK_DIR
36 - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
37 # Must do this here, as it's the only way to make sure the toolchain is installed on the same builder
38 - ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
Brad Bishopbec4ebc2022-08-03 09:55:16 -040039
40# Generalised fragment to do a Kas build
41.build:
42 extends: .setup
Andrew Geissler517393d2023-01-13 08:55:19 -060043 variables:
44 KUBERNETES_CPU_REQUEST: $CPU_REQUEST
Andrew Geissler9347dd42023-03-03 12:38:41 -060045 only:
46 variables:
47 - $BUILD_ENABLE_REGEX == null || $CI_JOB_NAME =~ $BUILD_ENABLE_REGEX
Brad Bishopbec4ebc2022-08-03 09:55:16 -040048 script:
49 - KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME")
Andrew Geisslerea144b032023-01-27 16:03:57 -060050 - kas dump --update --force-checkout --resolve-refs --resolve-env $KASFILES
Brad Bishopbec4ebc2022-08-03 09:55:16 -040051 - kas build $KASFILES
52 - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
53 artifacts:
54 name: "logs"
55 when: on_failure
56 paths:
57 - $CI_PROJECT_DIR/work/build/tmp/work*/**/temp/log.do_*.*
Andrew Geissler9347dd42023-03-03 12:38:41 -060058 - $CI_PROJECT_DIR/work/build/tmp/work*/**/testimage/*
Brad Bishopbec4ebc2022-08-03 09:55:16 -040059
60#
Andrew Geissler2daf84b2023-03-31 09:57:23 -050061# Prep stage, update repositories once.
62# Set the CI variable CI_CLEAN_REPOS=1 to refetch the respositories from scratch
Brad Bishopbec4ebc2022-08-03 09:55:16 -040063#
64update-repos:
65 extends: .setup
66 stage: prep
67 script:
68 - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
69
70#
71# Build stage, the actual build jobs
72#
73# Available options for building are
Andrew Geissler2daf84b2023-03-31 09:57:23 -050074# DISTRO: [poky, poky-tiny]
75# KERNEL: [linux-yocto, linux-yocto-dev, linux-yocto-rt]
Brad Bishopbec4ebc2022-08-03 09:55:16 -040076# TOOLCHAINS: [gcc, clang, armgcc, external-gccarm]
77# TCLIBC: [glibc, musl]
Andrew Geissler2daf84b2023-03-31 09:57:23 -050078# FIRMWARE: [u-boot, edk2]
79# TS: [none, trusted-services]
Brad Bishopbec4ebc2022-08-03 09:55:16 -040080# VIRT: [none, xen]
81# TESTING: testimage
82
83corstone500:
84 extends: .build
85 parallel:
86 matrix:
87 - TESTING: testimage
88 tags:
89 - x86_64
90
91corstone1000-fvp:
92 extends: .build
93 parallel:
94 matrix:
Andrew Geissler2daf84b2023-03-31 09:57:23 -050095 - TESTING: [testimage, tftf]
Brad Bishopbec4ebc2022-08-03 09:55:16 -040096 tags:
97 - x86_64
98
99corstone1000-mps3:
100 extends: .build
101
102fvp-base:
103 extends: .build
104 parallel:
105 matrix:
106 - TESTING: testimage
Andrew Geissler2daf84b2023-03-31 09:57:23 -0500107 - FIRMWARE: edk2
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400108
109fvp-baser-aemv8r64:
110 extends: .build
111 parallel:
112 matrix:
113 - TESTING: testimage
114 tags:
115 - x86_64
116
117fvps:
118 extends: .build
119
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400120generic-arm64:
121 extends: .build
122
123juno:
124 extends: .build
125 parallel:
126 matrix:
127 - TOOLCHAINS: [gcc, clang]
Andrew Geissler2daf84b2023-03-31 09:57:23 -0500128 FIRMWARE: [u-boot, edk2]
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400129
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400130musca-b1:
131 extends: .build
132
133musca-s1:
134 extends: .build
135
136n1sdp:
137 extends: .build
138 parallel:
139 matrix:
140 - TOOLCHAINS: [gcc, armgcc]
Andrew Geissler517393d2023-01-13 08:55:19 -0600141 TS: [none, trusted-services]
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400142
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400143qemu-generic-arm64:
144 extends: .build
145 parallel:
146 matrix:
Andrew Geissler2daf84b2023-03-31 09:57:23 -0500147 - KERNEL: [linux-yocto, linux-yocto-dev, linux-yocto-rt]
148 TOOLCHAINS: [gcc, clang]
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400149 TESTING: testimage
150
151qemuarm64-secureboot:
152 extends: .build
153 parallel:
154 matrix:
Andrew Geissler2daf84b2023-03-31 09:57:23 -0500155 - KERNEL: [linux-yocto, linux-yocto-dev, linux-yocto-rt]
156 TOOLCHAINS: [gcc, clang]
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400157 TCLIBC: [glibc, musl]
Patrick Williams2194f502022-10-16 14:26:09 -0500158 TS: [none, trusted-services]
Patrick Williams92b42cb2022-09-03 06:53:57 -0500159 TESTING: testimage
160
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400161qemuarm64:
162 extends: .build
163 parallel:
164 matrix:
Andrew Geissler2daf84b2023-03-31 09:57:23 -0500165 - DISTRO: poky
166 KERNEL: [linux-yocto, linux-yocto-dev, linux-yocto-rt]
167 TOOLCHAINS: [gcc, clang]
168 FIRMWARE: [u-boot, edk2]
169 TESTING: testimage
170 - DISTRO: poky-tiny
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400171 TESTING: testimage
172 - VIRT: xen
173
174qemuarm-secureboot:
175 extends: .build
176 parallel:
177 matrix:
Andrew Geissler2daf84b2023-03-31 09:57:23 -0500178 - KERNEL: [linux-yocto, linux-yocto-dev, linux-yocto-rt]
179 TOOLCHAINS: [gcc, clang, external-gccarm]
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400180 TESTING: testimage
181
182qemuarm:
183 extends: .build
184 parallel:
185 matrix:
Andrew Geissler2daf84b2023-03-31 09:57:23 -0500186 - DISTRO: poky
187 KERNEL: [linux-yocto, linux-yocto-dev, linux-yocto-rt]
188 TOOLCHAINS: [gcc, clang]
189 FIRMWARE: [u-boot, edk2]
190 TESTING: testimage
191 - DISTRO: poky-tiny
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400192 TESTING: testimage
193 - VIRT: xen
194
195qemuarmv5:
196 extends: .build
197 parallel:
198 matrix:
Andrew Geissler2daf84b2023-03-31 09:57:23 -0500199 - DISTRO: poky
200 KERNEL: [linux-yocto, linux-yocto-dev, linux-yocto-rt]
201 TESTING: testimage
202 - DISTRO: poky-tiny
203 TESTING: testimage
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400204
205sgi575:
206 extends: .build
207
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400208tc1:
209 extends: .build
210 tags:
211 - x86_64
212
213toolchains:
214 extends: .build
215
216selftest:
217 extends: .setup
218 script:
219 - KASFILES=./ci/qemuarm64.yml:./ci/selftest.yml
220 - kas shell --update --force-checkout $KASFILES -c 'oe-selftest --num-processes 1 --run-tests runfvp'
221
222# Validate layers are Yocto Project Compatible
223check-layers:
224 extends: .setup
225 script:
226 - kas shell --update --force-checkout ci/base.yml:ci/meta-openembedded.yml --command \
227 "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
228 parallel:
229 matrix:
Andrew Geissler517393d2023-01-13 08:55:19 -0600230 - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain]
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400231
232pending-updates:
233 extends: .setup
234 artifacts:
235 paths:
236 - update-report
237 script:
238 - rm -fr update-report
239 # This configuration has all of the layers we need enabled
Andrew Geisslerea144b032023-01-27 16:03:57 -0600240 - kas shell --update --force-checkout ci/qemuarm64.yml:ci/meta-openembedded.yml --command \
Andrew Geissler517393d2023-01-13 08:55:19 -0600241 "$CI_PROJECT_DIR/scripts/machine-summary.py -t report -o $CI_PROJECT_DIR/update-report $($CI_PROJECT_DIR/ci/listmachines.py meta-arm meta-arm-bsp)"
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400242 # Do this on x86 whilst the compilers are x86-only
243 tags:
244 - x86_64
245
246# What percentage of machines in the layer do we build
247machine-coverage:
Andrew Geissler517393d2023-01-13 08:55:19 -0600248 extends: .setup
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400249 script:
250 - ./ci/check-machine-coverage
251 coverage: '/Coverage: \d+/'
252
253metrics:
254 extends: .setup
255 artifacts:
256 reports:
257 metrics: metrics.txt
258 script:
259 - kas shell --update --force-checkout ci/base.yml --command \
260 "$CI_PROJECT_DIR/ci/patchreview $CI_PROJECT_DIR/meta-* --verbose --metrics $CI_PROJECT_DIR/metrics.txt"
Patrick Williams2390b1b2022-11-03 13:47:49 -0500261
262documentation:
263 extends: .setup
264 script:
265 - |
266 sudo pip3 install -r meta-arm-bsp/documentation/requirements.txt
267 for CONF in meta-*/documentation/*/conf.py ; do
268 SOURCE_DIR=$(dirname $CONF)
269 MACHINE=$(basename $SOURCE_DIR)
270 sphinx-build -vW $SOURCE_DIR build-docs/$MACHINE
271 done
272 test -d build-docs/
273 artifacts:
274 paths:
275 - build-docs/