blob: 75d3609455f5dc542399166cf772041a4b4274f8 [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 Geisslerea144b02023-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#
61# Prep stage, update repositories once
62#
63update-repos:
64 extends: .setup
65 stage: prep
66 script:
67 - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
68
69#
70# Build stage, the actual build jobs
71#
72# Available options for building are
73# TOOLCHAINS: [gcc, clang, armgcc, external-gccarm]
74# TCLIBC: [glibc, musl]
75# FIRMWARE: [uboot, edk2]
76# VIRT: [none, xen]
77# TESTING: testimage
78
79corstone500:
80 extends: .build
81 parallel:
82 matrix:
83 - TESTING: testimage
84 tags:
85 - x86_64
86
87corstone1000-fvp:
88 extends: .build
89 parallel:
90 matrix:
91 - TESTING: [testimage,tftf]
92 tags:
93 - x86_64
94
95corstone1000-mps3:
96 extends: .build
97
98fvp-base:
99 extends: .build
100 parallel:
101 matrix:
102 - TESTING: testimage
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400103
104fvp-base-arm32:
105 extends: .build
106 parallel:
107 matrix:
108 - TOOLCHAINS: [gcc, external-gccarm]
109 TESTING: testimage
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400110
111fvp-baser-aemv8r64:
112 extends: .build
113 parallel:
114 matrix:
115 - TESTING: testimage
116 tags:
117 - x86_64
118
119fvps:
120 extends: .build
121
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400122generic-arm64:
123 extends: .build
124
125juno:
126 extends: .build
127 parallel:
128 matrix:
129 - TOOLCHAINS: [gcc, clang]
130 FIRMWARE: [uboot, edk2]
131
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400132musca-b1:
133 extends: .build
134
135musca-s1:
136 extends: .build
137
138n1sdp:
139 extends: .build
140 parallel:
141 matrix:
142 - TOOLCHAINS: [gcc, armgcc]
Andrew Geissler517393d2023-01-13 08:55:19 -0600143 TS: [none, trusted-services]
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400144
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400145qemu-generic-arm64:
146 extends: .build
147 parallel:
148 matrix:
149 - TOOLCHAINS: [gcc, clang]
150 TESTING: testimage
151
152qemuarm64-secureboot:
153 extends: .build
154 parallel:
155 matrix:
156 - TOOLCHAINS: [gcc, clang]
157 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:
165 - TOOLCHAINS: [gcc, clang]
166 EFI: [uboot, edk2]
167 TESTING: testimage
168 - VIRT: xen
169
170qemuarm-secureboot:
171 extends: .build
172 parallel:
173 matrix:
174 - TOOLCHAINS: [gcc, clang]
175 TESTING: testimage
176
177qemuarm:
178 extends: .build
179 parallel:
180 matrix:
181 - TOOLCHAINS: [gcc, clang]
182 EFI: [uboot, edk2]
183 TESTING: testimage
184 - VIRT: xen
185
186qemuarmv5:
187 extends: .build
188 parallel:
189 matrix:
190 - TESTING: testimage
191
192sgi575:
193 extends: .build
194
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400195tc1:
196 extends: .build
197 tags:
198 - x86_64
199
200toolchains:
201 extends: .build
202
203selftest:
204 extends: .setup
205 script:
206 - KASFILES=./ci/qemuarm64.yml:./ci/selftest.yml
207 - kas shell --update --force-checkout $KASFILES -c 'oe-selftest --num-processes 1 --run-tests runfvp'
208
209# Validate layers are Yocto Project Compatible
210check-layers:
211 extends: .setup
212 script:
213 - kas shell --update --force-checkout ci/base.yml:ci/meta-openembedded.yml --command \
214 "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
215 parallel:
216 matrix:
Andrew Geissler517393d2023-01-13 08:55:19 -0600217 - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain]
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400218
219pending-updates:
220 extends: .setup
221 artifacts:
222 paths:
223 - update-report
224 script:
225 - rm -fr update-report
226 # This configuration has all of the layers we need enabled
Andrew Geisslerea144b02023-01-27 16:03:57 -0600227 - kas shell --update --force-checkout ci/qemuarm64.yml:ci/meta-openembedded.yml --command \
Andrew Geissler517393d2023-01-13 08:55:19 -0600228 "$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 -0400229 # Do this on x86 whilst the compilers are x86-only
230 tags:
231 - x86_64
232
233# What percentage of machines in the layer do we build
234machine-coverage:
Andrew Geissler517393d2023-01-13 08:55:19 -0600235 extends: .setup
Brad Bishopbec4ebc2022-08-03 09:55:16 -0400236 script:
237 - ./ci/check-machine-coverage
238 coverage: '/Coverage: \d+/'
239
240metrics:
241 extends: .setup
242 artifacts:
243 reports:
244 metrics: metrics.txt
245 script:
246 - kas shell --update --force-checkout ci/base.yml --command \
247 "$CI_PROJECT_DIR/ci/patchreview $CI_PROJECT_DIR/meta-* --verbose --metrics $CI_PROJECT_DIR/metrics.txt"
Patrick Williams2390b1b2022-11-03 13:47:49 -0500248
249documentation:
250 extends: .setup
251 script:
252 - |
253 sudo pip3 install -r meta-arm-bsp/documentation/requirements.txt
254 for CONF in meta-*/documentation/*/conf.py ; do
255 SOURCE_DIR=$(dirname $CONF)
256 MACHINE=$(basename $SOURCE_DIR)
257 sphinx-build -vW $SOURCE_DIR build-docs/$MACHINE
258 done
259 test -d build-docs/
260 artifacts:
261 paths:
262 - build-docs/