commondata: &commondata
  "container": "debian-bookworm"
  "envsetup": "poky/oe-init-build-env"
  "distro": "poky"
  "name": "Yocto Test Build"
  "targets": ["core-image-base"]
  "local_conf": [
    "INHERIT:append = ' buildstats buildstats-summary'",
    "INHERIT:remove = 'rm_work'",
    "PREFERRED_VERSION_linux-yocto = ''",
    "PREFERRED_PROVIDER_virtual/kernel = 'linux-yocto-dev'",
    "IMAGE_INSTALL:append = ' ltp'",
    "IMAGE_ROOTFS_EXTRA_SPACE = '102400'"
  ]
  "artifacts": [
    "images/*/core-image-base*.ext4",
    "images/*/Image*"
  ]

commonbblayers_conf:
  - &bbl_mm "BBLAYERS += '../meta-mainline/'"

commonsources:
  - &poky {"url": "http://git.yoctoproject.org/git/poky", "branch": "master"}
  - &mm {"url": "https://gitlab.com/aroxell/meta-mainline.git", "branch": "main"}

version: 1
name: Poky plus mainline kernel
description: Build Poky plus mainline kernel
jobs:
- name: build
  bakes:
    - <<: *commondata
      "machine": "qemuarm64"
      "sources":
         "git_trees": [ <<: *poky, *mm ]
      "bblayers_conf": [ *bbl_mm ]

  tests:
    - device: qemu-arm64
      kernel: "$BUILD/Image"
      rootfs: "$BUILD/core-image-base-qemuarm64-rootfs.ext4"
      parameters: {SKIPFILE: "skipfile-lkft.yaml"}
      tests: [ltp-smoke]
      timeouts: { "boot": 10 }
