version: 1
name: kunit tests
description: Build and test linux kernel with kunit
jobs:
- name: armv5
  builds:
    - toolchain: gcc-11
      target_arch: arm
      kconfig:
        - versatile_defconfig
        - CONFIG_PCI=y
        - CONFIG_PCI_VERSATILE=y
        - CONFIG_SCSI=y
        - CONFIG_BLK_DEV_SD=y
        - CONFIG_SCSI_SYM53C8XX_2=y
        - CONFIG_EXT4_FS=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
    - toolchain: clang-12
      target_arch: arm
      kconfig:
        - versatile_defconfig
        - CONFIG_PCI=y
        - CONFIG_PCI_VERSATILE=y
        - CONFIG_SCSI=y
        - CONFIG_BLK_DEV_SD=y
        - CONFIG_SCSI_SYM53C8XX_2=y
        - CONFIG_EXT4_FS=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
  test: {device: qemu-armv5, tests: [ltp-smoke]}
- name: armv7
  builds:
    - toolchain: gcc-11
      target_arch: arm
      kconfig:
        - defconfig
        - CONFIG_ARM_TI_CPUFREQ=y
        - CONFIG_SERIAL_8250_OMAP=y
        - CONFIG_POSIX_MQUEUE=y
        - CONFIG_SYN_COOKIES=y
        - CONFIG_OF=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
    - toolchain: clang-12
      target_arch: arm
      kconfig:
        - defconfig
        - CONFIG_ARM_TI_CPUFREQ=y
        - CONFIG_SERIAL_8250_OMAP=y
        - CONFIG_POSIX_MQUEUE=y
        - CONFIG_SYN_COOKIES=y
        - CONFIG_OF=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
  test: {device: qemu-armv7, tests: [ltp-smoke]}
- name: arm64
  builds:
    - toolchain: gcc-11
      target_arch: arm64
      kconfig:
        - defconfig
        - CONFIG_ARM64_MODULE_PLTS=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
    - toolchain: clang-12
      target_arch: arm64
      kconfig:
        - defconfig
        - CONFIG_ARM64_MODULE_PLTS=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
  test: {device: qemu-arm64, tests: [ltp-smoke]}
- name: i386
  builds:
    - toolchain: gcc-11
      target_arch: i386
      kconfig:
        - defconfig
        - kvm_guest.config
        - CONFIG_IGB=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
- name: i386
  builds:
    - toolchain: clang-12
      target_arch: i386
      kconfig:
        - defconfig
        - kvm_guest.config
        - CONFIG_IGB=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
  test: {device: qemu-i386, tests: [ltp-smoke]}
- name: mips64
  builds:
    - toolchain: gcc-10
      target_arch: mips
      kernel_image: vmlinux
      kconfig:
        - malta_defconfig
        - https://storage.tuxboot.com/mips64el/malta_defconfig
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
- name: mips64
  builds:
    - toolchain: clang-12
      target_arch: mips
      kernel_image: vmlinux
      kconfig:
        - malta_defconfig
        - https://storage.tuxboot.com/mips64el/malta_defconfig
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
  test: {device: qemu-mips64el, tests: [ltp-smoke]}
- name: ppc64
  builds:
    - toolchain: gcc-11
      target_arch: powerpc
      kernel_image: vmlinux
      kconfig:
        - pseries_defconfig
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
- name: ppc64
  builds:
    - toolchain: clang-12
      target_arch: powerpc
      kernel_image: vmlinux
      kconfig:
        - pseries_defconfig
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
  test: {device: qemu-ppc64, tests: [ltp-smoke]}
- name: riscv64
  builds:
    - toolchain: gcc-11
      target_arch: riscv
      kernel_image: Image
      kconfig:
        - defconfig
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
- name: riscv64
  builds:
    - toolchain: clang-12
      target_arch: riscv
      kernel_image: Image
      kconfig:
        - defconfig
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
  test: {device: qemu-riscv64, tests: [ltp-smoke]}
- name: sparc64
  builds:
    - toolchain: gcc-11
      target_arch: sparc
      kernel_image: vmlinux
      kconfig:
        - sparc64_defconfig
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
    - toolchain: clang-12
      target_arch: sparc
      kernel_image: vmlinux
      kconfig:
        - sparc64_defconfig
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
  test: {device: qemu-sparc64, tests: [ltp-smoke]}
- name: x86_64
  builds:
    - toolchain: gcc-11
      target_arch: x86_64
      kconfig:
        - defconfig
        - kvm_guest.config
        - CONFIG_IGB=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
    - toolchain: clang-12
      target_arch: x86_64
      kconfig:
        - defconfig
        - kvm_guest.config
        - CONFIG_IGB=y
        - CONFIG_KASAN=y
        - CONFIG_KUNIT=y
        - CONFIG_KUNIT_ALL_TESTS=y
  test: {device: qemu-x86_64, tests: [ltp-smoke]}
