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 | |
| 174 | qemuarm64: |
| 175 | extends: .build |
| 176 | parallel: |
| 177 | matrix: |
| 178 | - TOOLCHAINS: [gcc, clang] |
| 179 | EFI: [uboot, edk2] |
| 180 | TESTING: testimage |
| 181 | - VIRT: xen |
| 182 | |
| 183 | qemuarm-secureboot: |
| 184 | extends: .build |
| 185 | parallel: |
| 186 | matrix: |
| 187 | - TOOLCHAINS: [gcc, clang] |
| 188 | TESTING: testimage |
| 189 | |
| 190 | qemuarm: |
| 191 | extends: .build |
| 192 | parallel: |
| 193 | matrix: |
| 194 | - TOOLCHAINS: [gcc, clang] |
| 195 | EFI: [uboot, edk2] |
| 196 | TESTING: testimage |
| 197 | - VIRT: xen |
| 198 | |
| 199 | qemuarmv5: |
| 200 | extends: .build |
| 201 | parallel: |
| 202 | matrix: |
| 203 | - TESTING: testimage |
| 204 | |
| 205 | sgi575: |
| 206 | extends: .build |
| 207 | |
| 208 | tc0: |
| 209 | extends: .build |
| 210 | tags: |
| 211 | - x86_64 |
| 212 | |
| 213 | tc1: |
| 214 | extends: .build |
| 215 | tags: |
| 216 | - x86_64 |
| 217 | |
| 218 | toolchains: |
| 219 | extends: .build |
| 220 | |
| 221 | selftest: |
| 222 | extends: .setup |
| 223 | script: |
| 224 | - KASFILES=./ci/qemuarm64.yml:./ci/selftest.yml |
| 225 | - kas shell --update --force-checkout $KASFILES -c 'oe-selftest --num-processes 1 --run-tests runfvp' |
| 226 | |
| 227 | # Validate layers are Yocto Project Compatible |
| 228 | check-layers: |
| 229 | extends: .setup |
| 230 | script: |
| 231 | - kas shell --update --force-checkout ci/base.yml:ci/meta-openembedded.yml --command \ |
| 232 | "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency" |
| 233 | parallel: |
| 234 | matrix: |
| 235 | - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5] |
| 236 | |
| 237 | pending-updates: |
| 238 | extends: .setup |
| 239 | artifacts: |
| 240 | paths: |
| 241 | - update-report |
| 242 | script: |
| 243 | - rm -fr update-report |
| 244 | # This configuration has all of the layers we need enabled |
| 245 | - kas shell ci/gem5-arm64.yml --command \ |
| 246 | "$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)" |
| 247 | # Do this on x86 whilst the compilers are x86-only |
| 248 | tags: |
| 249 | - x86_64 |
| 250 | |
| 251 | # What percentage of machines in the layer do we build |
| 252 | machine-coverage: |
| 253 | stage: build |
| 254 | interruptible: true |
| 255 | script: |
| 256 | - ./ci/check-machine-coverage |
| 257 | coverage: '/Coverage: \d+/' |
| 258 | |
| 259 | metrics: |
| 260 | extends: .setup |
| 261 | artifacts: |
| 262 | reports: |
| 263 | metrics: metrics.txt |
| 264 | script: |
| 265 | - kas shell --update --force-checkout ci/base.yml --command \ |
| 266 | "$CI_PROJECT_DIR/ci/patchreview $CI_PROJECT_DIR/meta-* --verbose --metrics $CI_PROJECT_DIR/metrics.txt" |