1image: ghcr.io/siemens/kas/kas:3.2 2 3variables: 4 CPU_REQUEST: "" 5 DEFAULT_TAG: "" 6 # These are needed as the k8s executor doesn't respect the container entrypoint 7 # by default 8 FF_KUBERNETES_HONOR_ENTRYPOINT: 1 9 FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 0 10 11stages: 12 - prep 13 - build 14 15# Common job fragment to get a worker ready 16.setup: 17 tags: 18 - $DEFAULT_TAG 19 stage: build 20 interruptible: true 21 variables: 22 KAS_WORK_DIR: $CI_PROJECT_DIR/work 23 KAS_REPO_REF_DIR: $CI_BUILDS_DIR/persist/repos 24 SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate 25 DL_DIR: $CI_BUILDS_DIR/persist/downloads 26 BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml 27 TOOLCHAIN_DIR: $CI_BUILDS_DIR/persist/toolchains 28 IMAGE_DIR: $CI_PROJECT_DIR/work/build/tmp/deploy/images 29 TOOLCHAIN_LINK_DIR: $CI_PROJECT_DIR/work/build/toolchains 30 before_script: 31 - echo KAS_WORK_DIR = $KAS_WORK_DIR 32 - echo SSTATE_DIR = $SSTATE_DIR 33 - echo DL_DIR = $DL_DIR 34 - rm -rf $KAS_WORK_DIR 35 - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR 36 # Must do this here, as it's the only way to make sure the toolchain is installed on the same builder 37 - ./ci/get-binary-toolchains $DL_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR 38 39# Generalised fragment to do a Kas build 40.build: 41 extends: .setup 42 variables: 43 KUBERNETES_CPU_REQUEST: $CPU_REQUEST 44 script: 45 - KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME") 46 - kas dump --update --force-checkout --resolve-refs --resolve-env $KASFILES 47 - kas build $KASFILES 48 - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log 49 artifacts: 50 name: "logs" 51 when: on_failure 52 paths: 53 - $CI_PROJECT_DIR/work/build/tmp/work*/**/temp/log.do_*.* 54 55# 56# Prep stage, update repositories once 57# 58update-repos: 59 extends: .setup 60 stage: prep 61 script: 62 - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos 63 64# 65# Build stage, the actual build jobs 66# 67# Available options for building are 68# TOOLCHAINS: [gcc, clang, armgcc, external-gccarm] 69# TCLIBC: [glibc, musl] 70# FIRMWARE: [uboot, edk2] 71# VIRT: [none, xen] 72# TESTING: testimage 73 74corstone500: 75 extends: .build 76 parallel: 77 matrix: 78 - TESTING: testimage 79 tags: 80 - x86_64 81 82corstone1000-fvp: 83 extends: .build 84 parallel: 85 matrix: 86 - TESTING: [testimage,tftf] 87 tags: 88 - x86_64 89 90corstone1000-mps3: 91 extends: .build 92 93fvp-base: 94 extends: .build 95 parallel: 96 matrix: 97 - TESTING: testimage 98 99fvp-base-arm32: 100 extends: .build 101 parallel: 102 matrix: 103 - TOOLCHAINS: [gcc, external-gccarm] 104 TESTING: testimage 105 106fvp-baser-aemv8r64: 107 extends: .build 108 parallel: 109 matrix: 110 - TESTING: testimage 111 tags: 112 - x86_64 113 114fvps: 115 extends: .build 116 117generic-arm64: 118 extends: .build 119 120juno: 121 extends: .build 122 parallel: 123 matrix: 124 - TOOLCHAINS: [gcc, clang] 125 FIRMWARE: [uboot, edk2] 126 127musca-b1: 128 extends: .build 129 130musca-s1: 131 extends: .build 132 133n1sdp: 134 extends: .build 135 parallel: 136 matrix: 137 - TOOLCHAINS: [gcc, armgcc] 138 TS: [none, trusted-services] 139 140qemu-generic-arm64: 141 extends: .build 142 parallel: 143 matrix: 144 - TOOLCHAINS: [gcc, clang] 145 TESTING: testimage 146 147qemuarm64-secureboot: 148 extends: .build 149 parallel: 150 matrix: 151 - TOOLCHAINS: [gcc, clang] 152 TCLIBC: [glibc, musl] 153 TS: [none, trusted-services] 154 TESTING: testimage 155 156qemuarm64: 157 extends: .build 158 parallel: 159 matrix: 160 - TOOLCHAINS: [gcc, clang] 161 EFI: [uboot, edk2] 162 TESTING: testimage 163 - VIRT: xen 164 165qemuarm-secureboot: 166 extends: .build 167 parallel: 168 matrix: 169 - TOOLCHAINS: [gcc, clang] 170 TESTING: testimage 171 172qemuarm: 173 extends: .build 174 parallel: 175 matrix: 176 - TOOLCHAINS: [gcc, clang] 177 EFI: [uboot, edk2] 178 TESTING: testimage 179 - VIRT: xen 180 181qemuarmv5: 182 extends: .build 183 parallel: 184 matrix: 185 - TESTING: testimage 186 187sgi575: 188 extends: .build 189 190tc1: 191 extends: .build 192 tags: 193 - x86_64 194 195toolchains: 196 extends: .build 197 198selftest: 199 extends: .setup 200 script: 201 - KASFILES=./ci/qemuarm64.yml:./ci/selftest.yml 202 - kas shell --update --force-checkout $KASFILES -c 'oe-selftest --num-processes 1 --run-tests runfvp' 203 204# Validate layers are Yocto Project Compatible 205check-layers: 206 extends: .setup 207 script: 208 - kas shell --update --force-checkout ci/base.yml:ci/meta-openembedded.yml --command \ 209 "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency" 210 parallel: 211 matrix: 212 - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain] 213 214pending-updates: 215 extends: .setup 216 artifacts: 217 paths: 218 - update-report 219 script: 220 - rm -fr update-report 221 # This configuration has all of the layers we need enabled 222 - kas shell --update --force-checkout ci/qemuarm64.yml:ci/meta-openembedded.yml --command \ 223 "$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)" 224 # Do this on x86 whilst the compilers are x86-only 225 tags: 226 - x86_64 227 228# What percentage of machines in the layer do we build 229machine-coverage: 230 extends: .setup 231 script: 232 - ./ci/check-machine-coverage 233 coverage: '/Coverage: \d+/' 234 235metrics: 236 extends: .setup 237 artifacts: 238 reports: 239 metrics: metrics.txt 240 script: 241 - kas shell --update --force-checkout ci/base.yml --command \ 242 "$CI_PROJECT_DIR/ci/patchreview $CI_PROJECT_DIR/meta-* --verbose --metrics $CI_PROJECT_DIR/metrics.txt" 243 244documentation: 245 extends: .setup 246 script: 247 - | 248 sudo pip3 install -r meta-arm-bsp/documentation/requirements.txt 249 for CONF in meta-*/documentation/*/conf.py ; do 250 SOURCE_DIR=$(dirname $CONF) 251 MACHINE=$(basename $SOURCE_DIR) 252 sphinx-build -vW $SOURCE_DIR build-docs/$MACHINE 253 done 254 test -d build-docs/ 255 artifacts: 256 paths: 257 - build-docs/ 258