fragments: &fragments
  - &frag-lkft-base https://gitlab.com/Linaro/lkft/kernel-fragments/-/raw/main/lkft.config
  - &frag-lkft-crypto https://gitlab.com/Linaro/lkft/kernel-fragments/-/raw/main/lkft-crypto.config
  - &frag-lkft-distro https://gitlab.com/Linaro/lkft/kernel-fragments/-/raw/main/distro-overrides.config
  - &frag-lkft-netdev https://gitlab.com/Linaro/lkft/kernel-fragments/-/raw/main/netdev.config
  - &frag-lkft-systemd https://gitlab.com/Linaro/lkft/kernel-fragments/-/raw/main/systemd.config
  - &frag-lkft-virtio https://gitlab.com/Linaro/lkft/kernel-fragments/-/raw/main/virtio.config
  - &frag-graviton3 https://gitlab.com/Linaro/lkft/kernel-fragments/-/raw/main/graviton3_defconfig

lava-job-priority: &lava-job-priority 27
lava-job-priority-sanity: &lava-job-priority-sanity 80

# if the job takes long than the lava-queue-timeout in hours to be scheduled
# the job will be canceled.
lava-queue-timeout: &lava-queue-timeout 72

# debian rootfs
rootfs-debian-testing-arm: &rootfs-debian-testing-arm https://storage.tuxboot.com/debian/trixie/armhf/rootfs.ext4.xz
rootfs-debian-testing-arm-tar: &rootfs-debian-testing-arm-tar https://storage.tuxboot.com/debian/trixie/armhf/rootfs.tar.xz
rootfs-debian-testing-arm64: &rootfs-debian-testing-arm64 https://storage.tuxboot.com/debian/trixie/arm64/rootfs.ext4.xz
rootfs-debian-testing-arm64-tar: &rootfs-debian-testing-arm64-tar https://storage.tuxboot.com/debian/trixie/arm64/rootfs.tar.xz
rootfs-debian-testing-i386: &rootfs-debian-testing-i386 https://storage.tuxboot.com/debian/trixie/i386/rootfs.ext4.xz
rootfs-debian-testing-i386-tar: &rootfs-debian-testing-i386-tar https://storage.tuxboot.com/debian/trixie/i386/rootfs.tar.xz
rootfs-debian-testing-s390: &rootfs-debian-testing-s390 https://storage.tuxboot.com/debian/trixie/s390x/rootfs.ext4.xz
rootfs-debian-testing-s390-tar: &rootfs-debian-testing-s390-tar https://storage.tuxboot.com/debian/trixie/s390x/rootfs.tar.xz
rootfs-debian-testing-x86_64: &rootfs-debian-testing-x86_64 https://storage.tuxboot.com/debian/trixie/amd64/rootfs.ext4.xz
rootfs-debian-testing-x86_64-tar: &rootfs-debian-testing-x86_64-tar https://storage.tuxboot.com/debian/trixie/amd64/rootfs.tar.xz

rootfs-debian-bookworm-arm64: &rootfs-debian-bookworm-arm64 https://storage.tuxboot.com/debian/bookworm/arm64/rootfs.ext4.xz
rootfs-debian-bookworm-arm64-tar: &rootfs-debian-bookworm-arm64-tar https://storage.tuxboot.com/debian/bookworm/arm64/rootfs.tar.xz

rootfs-debian-sid-riscv64: &rootfs-debian-sid-riscv64 https://storage.tuxboot.com/debian/sid/riscv64/rootfs.ext4.xz

# debian-kvm rootfs
rootfs-debian-kvm-testing-arm: &rootfs-debian-kvm-testing-arm https://storage.tuxboot.com/debian-kvm/trixie/armhf/rootfs.ext4.xz
rootfs-debian-kvm-testing-arm64: &rootfs-debian-kvm-testing-arm64 https://storage.tuxboot.com/debian-kvm/trixie/arm64/rootfs.ext4.xz
rootfs-debian-kvm-testing-arm64-tar: &rootfs-debian-kvm-testing-arm64-tar https://storage.tuxboot.com/debian-kvm/trixie/arm64/rootfs.tar.xz
rootfs-debian-kvm-testing-i386: &rootfs-debian-kvm-testing-i386 https://storage.tuxboot.com/debian-kvm/trixie/i386/rootfs.ext4.xz
rootfs-debian-kvm-testing-x86_64: &rootfs-debian-kvm-testing-x86_64 https://storage.tuxboot.com/debian-kvm/trixie/amd64/rootfs.ext4.xz

rootfs-debian-kvm-bookworm-arm64: &rootfs-debian-kvm-bookworm-arm64 https://storage.tuxboot.com/debian-kvm/bookworm/arm64/rootfs.ext4.xz

# debian-xfstests rootfs
rootfs-debian-xfstests-testing-arm64: &rootfs-debian-xfstests-testing-arm64 https://storage.tuxboot.com/debian-xfstests/trixie/arm64/rootfs.ext4.xz
rootfs-debian-xfstests-testing-arm64-tar: &rootfs-debian-xfstests-testing-arm64-tar https://storage.tuxboot.com/debian-xfstests/trixie/arm64/rootfs.tar.xz
rootfs-debian-xfstests-testing-x86_64: &rootfs-debian-xfstests-testing-x86_64 https://storage.tuxboot.com/debian-xfstests/trixie/amd64/rootfs.ext4.xz

kvm-unit-tests-debian-trixie-arm: &kvm-unit-tests-debian-trixie-arm https://storage.tuxboot.com/overlays/debian/trixie/armhf/20240216/kvm-unit-tests/master/kvm-unit-tests.tar.xz
kvm-unit-tests-debian-trixie-arm64: &kvm-unit-tests-debian-trixie-arm64 https://storage.dev.tuxboot.com/overlays/debian/trixie/arm64/20240216/kvm-unit-tests/master/kvm-unit-tests.tar.xz
kvm-unit-tests-debian-trixie-i386: &kvm-unit-tests-debian-trixie-i386 https://storage.tuxboot.com/overlays/debian/trixie/i386/20240216/kvm-unit-tests/master/kvm-unit-tests.tar.xz
kvm-unit-tests-debian-trixie-x86_64: &kvm-unit-tests-debian-trixie-x86_64 https://storage.tuxboot.com/overlays/debian/trixie/amd64/20240216/kvm-unit-tests/master/kvm-unit-tests.tar.xz

kvm-unit-tests-debian-bookworm-arm64: &kvm-unit-tests-debian-bookworm-arm64 https://storage.dev.tuxboot.com/overlays/debian/bookworm/arm64/20240216/kvm-unit-tests/master/kvm-unit-tests.tar.xz

libgpiod-debian-trixie-arm: &libgpiod-debian-trixie-arm https://storage.tuxboot.com/overlays/debian/trixie/armhf/libgpiod/v2.1/libgpiod.tar.xz
libgpiod-debian-trixie-arm64: &libgpiod-debian-trixie-arm64 https://storage.dev.tuxboot.com/overlays/debian/trixie/arm64/libgpiod/v2.1/libgpiod.tar.xz
libgpiod-debian-trixie-i386: &libgpiod-debian-trixie-i386 https://storage.tuxboot.com/overlays/debian/trixie/i386/libgpiod/v2.1/libgpiod.tar.xz
libgpiod-debian-trixie-x86_64: &libgpiod-debian-trixie-x86_64 https://storage.tuxboot.com/overlays/debian/trixie/amd64/libgpiod/v2.1/libgpiod.tar.xz
libgpiod-debian-sid-riscv64: &libgpiod-debian-sid-riscv64 https://storage.tuxboot.com/overlays/debian/sid/riscv64/libgpiod/v2.1/libgpiod.tar.xz

ltp-debian-trixie-arm: &ltp-debian-trixie-arm https://storage.tuxboot.com/overlays/debian/trixie/armhf/ltp/20240930/ltp.tar.xz
ltp-debian-trixie-arm64: &ltp-debian-trixie-arm64 https://storage.tuxboot.com/overlays/debian/trixie/arm64/ltp/20240930/ltp.tar.xz
ltp-debian-trixie-i386: &ltp-debian-trixie-i386 https://storage.tuxboot.com/overlays/debian/trixie/i386/ltp/20240930/ltp.tar.xz
ltp-debian-trixie-x86_64: &ltp-debian-trixie-x86_64 https://storage.tuxboot.com/overlays/debian/trixie/amd64/ltp/20240930/ltp.tar.xz
ltp-debian-sid-riscv64: &ltp-debian-sid-riscv64 https://storage.tuxboot.com/overlays/debian/sid/riscv64/ltp/20240930/ltp.tar.xz

libhugetlbfs-debian-trixie-arm: &libhugetlbfs-debian-trixie-arm https://storage.tuxboot.com/overlays/debian/trixie/armhf/libhugetlbfs/2.24/libhugetlbfs.tar.xz
libhugetlbfs-debian-trixie-arm64: &libhugetlbfs-debian-trixie-arm64 https://storage.tuxboot.com/overlays/debian/trixie/arm64/libhugetlbfs/2.24/libhugetlbfs.tar.xz
libhugetlbfs-debian-trixie-i386: &libhugetlbfs-debian-trixie-i386 https://storage.tuxboot.com/overlays/debian/trixie/i386/libhugetlbfs/2.24/libhugetlbfs.tar.xz
libhugetlbfs-debian-trixie-x86_64: &libhugetlbfs-debian-trixie-x86_64 https://storage.tuxboot.com/overlays/debian/trixie/amd64/libhugetlbfs/2.24/libhugetlbfs.tar.xz

xfstests-debian-trixie-arm64: &xfstests-debian-trixie-arm64 https://storage.tuxboot.com/overlays/debian/trixie/arm64/xfstests/master/xfstests.tar.xz
xfstests-debian-trixie-x86_64: &xfstests-debian-trixie-x86_64 https://storage.tuxboot.com/overlays/debian/trixie/amd64/xfstests/master/xfstests.tar.xz

boot-timeout-arm: &boot-timeout-arm 30
boot-timeout-arm64: &boot-timeout-arm64 30
boot-timeout-fvp: &boot-timeout-fvp 60
boot-timeout-i386: &boot-timeout-i386 15
boot-timeout-x86: &boot-timeout-x86 15

kselftest-timeout: &kselftest-timeout 20
kselftest-arm64-timeout: &kselftest-arm64-timeout 60
kselftest-arm64-timeout-ssh-device: &kselftest-arm64-timeout-ssh-device 7
kselftest-ftrace-timeout: &kselftest-ftrace-timeout 40
kselftest-kvm-timeout: &kselftest-kvm-timeout 60
kselftest-kvm-timeout-ssh-device: &kselftest-kvm-timeout-ssh-device 10
kselftest-memfd-timeout: &kselftest-memfd-timeout 30
kselftest-net-timeout: &kselftest-net-timeout 30
kselftest-seccomp-timeout: &kselftest-seccomp-timeout 10
kselftest-tc-testing-timeout: &kselftest-tc-testing-timeout 20
kselftest-timers-timeout: &kselftest-timers-timeout 15
kselftest-rseq-timeout: &kselftest-rseq-timeout 30

kvm-unit-tests-timeout: &kvm-unit-tests-timeout 60
kvm-unit-tests-timeout-fvp: &kvm-unit-tests-timeout-fvp 160
kvm-unit-tests-timeout-ssh-device: &kvm-unit-tests-timeout-ssh-device 7

ltp-commands-timeout: &ltp-commands-timeout 40
ltp-containers-timeout: &ltp-containers-timeout 25
ltp-controllers-timeout: &ltp-controllers-timeout 80
ltp-crypto-timeout: &ltp-crypto-timeout 30
ltp-cve-timeout: &ltp-cve-timeout 50
ltp-fs_bind-timeout: &ltp-fs_bind-timeout 40
ltp-fs-timeout: &ltp-fs-timeout 40
ltp-fs_perms_simple-timeout: &ltp-fs_perms_simple-timeout 10
ltp-hugetlb-timeout: &ltp-hugetlb-timeout 20
ltp-math-timeout: &ltp-math-timeout 50
ltp-mm-timeout: &ltp-mm-timeout 40
ltp-pty-timeout: &ltp-pty-timeout 10
ltp-sched-timeout: &ltp-sched-timeout 30
ltp-syscalls-timeout: &ltp-syscalls-timeout 50
ltp-tracing-timeout: &ltp-tracing-timeout 30
ltp-smoke-timeout: &ltp-smoke-timeout 15

perf-timeout: &perf-timeout 60
commands-timeout: &commands-timeout 1

xfstests-btrfs-timeout: &xfstests-btrfs-timeout 150
xfstests-ext4-timeout: &xfstests-ext4-timeout 120

version: 1
name: full kernel validation for the master branch.
description: Build and test linux kernel with every toolchain
jobs:
# arm64
- name: arm64-hw-gcc-lkftconfig-tests
  builds:
    - build_name: gcc-13-lkftconfig
      target_arch: arm64
      toolchain: gcc-13
      kconfig: [ defconfig, *frag-lkft-base, *frag-lkft-crypto, *frag-lkft-distro, *frag-lkft-netdev, *frag-lkft-systemd, *frag-lkft-virtio, CONFIG_SYN_COOKIES=y, CONFIG_SCHEDSTATS=y ]
  tests:
    - device: qemu-arm64
      boot_args: rw
      parameters: {SKIPFILE: "skipfile-lkft.yaml", MODULES_PATH:  "/usr/", RUNNER: "kirk"}
      rootfs: *rootfs-debian-testing-arm64
      overlay: [ *ltp-debian-trixie-arm64 ]
      tests: [ltp-smoke]
      timeouts: { "boot": *boot-timeout-arm64, "ltp-smoke": *ltp-smoke-timeout }
    - device: bcm2711-rpi-4-b
      boot_args: rw
      dtb: broadcom/bcm2711-rpi-4-b.dtb
      parameters: {SKIPFILE: "skipfile-lkft.yaml", MODULES_PATH:  "/usr/", DEPLOY_OS: "debian", LAVA_JOB_PRIORITY: *lava-job-priority-sanity, LAVA_QUEUE_TIMEOUT: *lava-queue-timeout, RUNNER: "kirk"}
      rootfs: *rootfs-debian-testing-arm64-tar
      overlay: [ *ltp-debian-trixie-arm64 ]
      tests: [ltp-smoke]
      timeouts: { "boot": *boot-timeout-arm64 }
