Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | image: ghcr.io/siemens/kas/kas:latest-release |
| 2 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 3 | variables: |
| 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 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 11 | stages: |
| 12 | - prep |
| 13 | - build |
| 14 | |
| 15 | # Common job fragment to get a worker ready |
| 16 | .setup: |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 17 | tags: |
| 18 | - $DEFAULT_TAG |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 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 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 38 | |
| 39 | # Generalised fragment to do a Kas build |
| 40 | .build: |
| 41 | extends: .setup |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 42 | variables: |
| 43 | KUBERNETES_CPU_REQUEST: $CPU_REQUEST |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 44 | script: |
| 45 | - KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME") |
Andrew Geissler | ea144b0 | 2023-01-27 16:03:57 -0600 | [diff] [blame] | 46 | - kas dump --update --force-checkout --resolve-refs --resolve-env $KASFILES |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 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 | # |
| 58 | update-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 | |
| 74 | corstone500: |
| 75 | extends: .build |
| 76 | parallel: |
| 77 | matrix: |
| 78 | - TESTING: testimage |
| 79 | tags: |
| 80 | - x86_64 |
| 81 | |
| 82 | corstone1000-fvp: |
| 83 | extends: .build |
| 84 | parallel: |
| 85 | matrix: |
| 86 | - TESTING: [testimage,tftf] |
| 87 | tags: |
| 88 | - x86_64 |
| 89 | |
| 90 | corstone1000-mps3: |
| 91 | extends: .build |
| 92 | |
| 93 | fvp-base: |
| 94 | extends: .build |
| 95 | parallel: |
| 96 | matrix: |
| 97 | - TESTING: testimage |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 98 | |
| 99 | fvp-base-arm32: |
| 100 | extends: .build |
| 101 | parallel: |
| 102 | matrix: |
| 103 | - TOOLCHAINS: [gcc, external-gccarm] |
| 104 | TESTING: testimage |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 105 | |
| 106 | fvp-baser-aemv8r64: |
| 107 | extends: .build |
| 108 | parallel: |
| 109 | matrix: |
| 110 | - TESTING: testimage |
| 111 | tags: |
| 112 | - x86_64 |
| 113 | |
| 114 | fvps: |
| 115 | extends: .build |
| 116 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 117 | generic-arm64: |
| 118 | extends: .build |
| 119 | |
| 120 | juno: |
| 121 | extends: .build |
| 122 | parallel: |
| 123 | matrix: |
| 124 | - TOOLCHAINS: [gcc, clang] |
| 125 | FIRMWARE: [uboot, edk2] |
| 126 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 127 | musca-b1: |
| 128 | extends: .build |
| 129 | |
| 130 | musca-s1: |
| 131 | extends: .build |
| 132 | |
| 133 | n1sdp: |
| 134 | extends: .build |
| 135 | parallel: |
| 136 | matrix: |
| 137 | - TOOLCHAINS: [gcc, armgcc] |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 138 | TS: [none, trusted-services] |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 139 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 140 | qemu-generic-arm64: |
| 141 | extends: .build |
| 142 | parallel: |
| 143 | matrix: |
| 144 | - TOOLCHAINS: [gcc, clang] |
| 145 | TESTING: testimage |
| 146 | |
| 147 | qemuarm64-secureboot: |
| 148 | extends: .build |
| 149 | parallel: |
| 150 | matrix: |
| 151 | - TOOLCHAINS: [gcc, clang] |
| 152 | TCLIBC: [glibc, musl] |
Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame] | 153 | TS: [none, trusted-services] |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 154 | TESTING: testimage |
| 155 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 156 | qemuarm64: |
| 157 | extends: .build |
| 158 | parallel: |
| 159 | matrix: |
| 160 | - TOOLCHAINS: [gcc, clang] |
| 161 | EFI: [uboot, edk2] |
| 162 | TESTING: testimage |
| 163 | - VIRT: xen |
| 164 | |
| 165 | qemuarm-secureboot: |
| 166 | extends: .build |
| 167 | parallel: |
| 168 | matrix: |
| 169 | - TOOLCHAINS: [gcc, clang] |
| 170 | TESTING: testimage |
| 171 | |
| 172 | qemuarm: |
| 173 | extends: .build |
| 174 | parallel: |
| 175 | matrix: |
| 176 | - TOOLCHAINS: [gcc, clang] |
| 177 | EFI: [uboot, edk2] |
| 178 | TESTING: testimage |
| 179 | - VIRT: xen |
| 180 | |
| 181 | qemuarmv5: |
| 182 | extends: .build |
| 183 | parallel: |
| 184 | matrix: |
| 185 | - TESTING: testimage |
| 186 | |
| 187 | sgi575: |
| 188 | extends: .build |
| 189 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 190 | tc1: |
| 191 | extends: .build |
| 192 | tags: |
| 193 | - x86_64 |
| 194 | |
| 195 | toolchains: |
| 196 | extends: .build |
| 197 | |
| 198 | selftest: |
| 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 |
| 205 | check-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: |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 212 | - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain] |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 213 | |
| 214 | pending-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 |
Andrew Geissler | ea144b0 | 2023-01-27 16:03:57 -0600 | [diff] [blame] | 222 | - kas shell --update --force-checkout ci/qemuarm64.yml:ci/meta-openembedded.yml --command \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 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)" |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 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 |
| 229 | machine-coverage: |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 230 | extends: .setup |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 231 | script: |
| 232 | - ./ci/check-machine-coverage |
| 233 | coverage: '/Coverage: \d+/' |
| 234 | |
| 235 | metrics: |
| 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" |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 243 | |
| 244 | documentation: |
| 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/ |