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