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

lava-job-priority: &lava-job-priority 97
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/bookworm/armhf/rootfs.ext4.xz
rootfs-debian-testing-arm-tar: &rootfs-debian-testing-arm-tar https://storage.tuxboot.com/debian/bookworm/armhf/rootfs.tar.xz
rootfs-debian-testing-arm64: &rootfs-debian-testing-arm64 https://storage.tuxboot.com/debian/bookworm/arm64/rootfs.ext4.xz
rootfs-debian-testing-arm64-tar: &rootfs-debian-testing-arm64-tar https://storage.tuxboot.com/debian/bookworm/arm64/rootfs.tar.xz
rootfs-debian-testing-i386: &rootfs-debian-testing-i386 https://storage.tuxboot.com/debian/bookworm/i386/rootfs.ext4.xz
rootfs-debian-testing-i386-tar: &rootfs-debian-testing-i386-tar https://storage.tuxboot.com/debian/bookworm/i386/rootfs.tar.xz
rootfs-debian-testing-x86_64: &rootfs-debian-testing-x86_64 https://storage.tuxboot.com/debian/bookworm/amd64/rootfs.ext4.xz
rootfs-debian-testing-x86_64-tar: &rootfs-debian-testing-x86_64-tar https://storage.tuxboot.com/debian/bookworm/amd64/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/bookworm/armhf/rootfs.ext4.xz
rootfs-debian-kvm-testing-arm64: &rootfs-debian-kvm-testing-arm64 https://storage.tuxboot.com/debian-kvm/bookworm/arm64/rootfs.ext4.xz
rootfs-debian-kvm-testing-arm64-tar: &rootfs-debian-kvm-testing-arm64-tar https://storage.tuxboot.com/debian-kvm/bookworm/arm64/rootfs.tar.xz
rootfs-debian-kvm-testing-i386: &rootfs-debian-kvm-testing-i386 https://storage.tuxboot.com/debian-kvm/bookworm/i386/rootfs.ext4.xz
rootfs-debian-kvm-testing-x86_64: &rootfs-debian-kvm-testing-x86_64 https://storage.tuxboot.com/debian-kvm/bookworm/amd64/rootfs.ext4.xz

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

kvm-unit-tests-debian-bookworm-arm: &kvm-unit-tests-debian-bookworm-arm https://storage.tuxboot.com/overlays/debian/bookworm/armhf/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
kvm-unit-tests-debian-bookworm-i386: &kvm-unit-tests-debian-bookworm-i386 https://storage.tuxboot.com/overlays/debian/bookworm/i386/20240216/kvm-unit-tests/master/kvm-unit-tests.tar.xz
kvm-unit-tests-debian-bookworm-x86_64: &kvm-unit-tests-debian-bookworm-x86_64 https://storage.tuxboot.com/overlays/debian/bookworm/amd64/20240216/kvm-unit-tests/master/kvm-unit-tests.tar.xz

libgpiod-debian-bookworm-arm: &libgpiod-debian-bookworm-arm https://storage.tuxboot.com/overlays/debian/bookworm/armhf/libgpiod/v2.1/libgpiod.tar.xz
libgpiod-debian-bookworm-arm64: &libgpiod-debian-bookworm-arm64 https://storage.dev.tuxboot.com/overlays/debian/bookworm/arm64/libgpiod/v2.1/libgpiod.tar.xz
libgpiod-debian-bookworm-i386: &libgpiod-debian-bookworm-i386 https://storage.tuxboot.com/overlays/debian/bookworm/i386/libgpiod/v2.1/libgpiod.tar.xz
libgpiod-debian-bookworm-x86_64: &libgpiod-debian-bookworm-x86_64 https://storage.tuxboot.com/overlays/debian/bookworm/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-bookworm-arm: &ltp-debian-bookworm-arm https://storage.tuxboot.com/overlays/debian/bookworm/armhf/ltp/20240129/ltp.tar.xz
ltp-debian-bookworm-arm64: &ltp-debian-bookworm-arm64 https://storage.tuxboot.com/overlays/debian/bookworm/arm64/ltp/20240129/ltp.tar.xz
ltp-debian-bookworm-i386: &ltp-debian-bookworm-i386 https://storage.tuxboot.com/overlays/debian/bookworm/i386/ltp/20240129/ltp.tar.xz
ltp-debian-bookworm-x86_64: &ltp-debian-bookworm-x86_64 https://storage.tuxboot.com/overlays/debian/bookworm/amd64/ltp/20240129/ltp.tar.xz
ltp-debian-sid-riscv64: &ltp-debian-sid-riscv64 https://storage.tuxboot.com/overlays/debian/sid/riscv64/ltp/20240129/ltp.tar.xz

xfstests-debian-bookworm-arm64: &xfstests-debian-bookworm-arm64 https://storage.tuxboot.com/overlays/debian/bookworm/arm64/xfstests/master/xfstests.tar.xz
xfstests-debian-bookworm-x86_64: &xfstests-debian-bookworm-x86_64 https://storage.tuxboot.com/overlays/debian/bookworm/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-ftrace-timeout: &kselftest-ftrace-timeout 40
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 10
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

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

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

version: 1
name: boot times validation with systemd-analyze for the master branch.
description: Build and run systemd-analyze to get the boot times measurements.
jobs:
# arm64
- name: arm64-lkftconfig-tests
  builds:
    - build_name: clang-18-lkftconfig
      target_arch: arm64
      toolchain: clang-18
      make_variables:
        LLVM: 1
        LLVM_IAS: 1
      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 ]
    - 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"}
      rootfs: *rootfs-debian-testing-arm64
      tests: [systemd-analyze]
      timeouts: { "boot": *boot-timeout-arm64 }
    - device: dragonboard-410c
      boot_args: rw
      dtb: qcom/apq8016-sbc.dtb
      parameters: {SKIPFILE: "skipfile-lkft.yaml", DEPLOY_OS: "debian", LAVA_JOB_PRIORITY: *lava-job-priority, LAVA_QUEUE_TIMEOUT: *lava-queue-timeout}
      rootfs: *rootfs-debian-testing-arm64
      tests: [systemd-analyze]
      timeouts: { "boot": *boot-timeout-arm64 }
    - device: dragonboard-845c
      boot_args: rw
      dtb: qcom/sdm845-db845c.dtb
      parameters: {SKIPFILE: "skipfile-lkft.yaml", DEPLOY_OS: "debian", LAVA_JOB_PRIORITY: *lava-job-priority, LAVA_QUEUE_TIMEOUT: *lava-queue-timeout}
      rootfs: *rootfs-debian-testing-arm64
      tests: [systemd-analyze]
      timeouts: { "boot": *boot-timeout-arm64 }
    - device: juno-r2
      boot_args: rw
      dtb: arm/juno-r2.dtb
      parameters: {SKIPFILE: "skipfile-lkft.yaml", DEPLOY_OS: "debian", LAVA_JOB_PRIORITY: *lava-job-priority, LAVA_QUEUE_TIMEOUT: *lava-queue-timeout}
      rootfs: *rootfs-debian-testing-arm64-tar
      tests: [systemd-analyze]
      timeouts: { "boot": *boot-timeout-arm64 }
    - device: rk3399-rock-pi-4b
      boot_args: rw
      dtb: rockchip/rk3399-rock-pi-4b.dtb
      parameters: {SKIPFILE: "skipfile-lkft.yaml", DEPLOY_OS: "debian", LAVA_JOB_PRIORITY: *lava-job-priority, LAVA_QUEUE_TIMEOUT: *lava-queue-timeout}
      rootfs: *rootfs-debian-testing-arm64-tar
      tests: [systemd-analyze]
      timeouts: { "boot": *boot-timeout-arm64 }
