mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
![Muhammad Moinur Rahman](/assets/img/avatar_default.png)
The goal of this project is to integrate the relevant scripts from the FreeBSD-CI project (https://github.com/freebsd/freebsd-ci) into the src repository. This allows developers to run the test suite similar to how it is executed on ci.freebsd.org, and eventually, have it directly used by our CI system. This effort is also part of the workflow improvement project, aiming to incorporate pre-merge testing. Current Features: * Does smoke tests using either bhyve(amd64 only) or qemu(Non x86_64 or when defined USE_QEMU=1). Currently defined CITYPE=smoke. Once we have added full tests we can also utilize something like CITYPE=full * Most of the resources are dynamically allocated based on available resources in the host * If CPU supports POPCNT or vmm can be loaded then bhyve is used for amd64 otherwise automatically installs and uses qemu@nox11 * When required third party applications or packages for booting non-x86 images are automatically installed Current Limitation: * Does not support full tests like the one in our Jenkins * At this moment this is also not suitable to be used in our Jenkins platform as the jobs are divided in multiple smaller tasks and artifacts are moved here and there which are not exactly the scenario for individual developers. Future Works: * Add full tests like the one in ci.freebsd.org * Add different tests or options to disable some tests * Add test profiles full * Possibly add test through Cloud Providers like AWS/GCP/Azure or Cirrus or Github Actions * Update documentation Test Plan: cd /usr/src/tests/ci make ci make TARGET=amd64 TARGET_ARCH=amd64 ci make TARGET=amd64 TARGET_ARCH=amd64 USE_QEMU=1 ci make TARGET=arm64 TARGET_ARCH=aarch64 ci make TARGET=powerpc TARGET_ARCH=powerpc64 ci make TARGET=powerpc TARGET_ARCH=powerpc64le ci make TARGET=riscv TARGET_ARCH=riscv64 ci Reviewed by: lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43786
33 lines
1 KiB
Makefile
33 lines
1 KiB
Makefile
# SPDX-License-Identifier: BSD-2-Clause
|
|
#
|
|
# Copyright (c) 2024 The FreeBSD Foundation
|
|
#
|
|
# This software was developed by Cybermancer Infosec <bofh@FreeBSD.org>
|
|
# under sponsorship from the FreeBSD Foundation.
|
|
#
|
|
# CI Makefile for riscv64.
|
|
#
|
|
QEMU_ARCH=riscv64
|
|
QEMU_DEVICES=-device virtio-blk-device,drive=hd0
|
|
QEMU_EXTRA_PARAM=-bios /usr/local/share/opensbi/lp64/generic/firmware/fw_jump.elf -kernel /usr/local/share/u-boot/u-boot-qemu-riscv64/u-boot.bin
|
|
QEMU_MAX_CPU_COUNT=16
|
|
QEMU_MAX_MEM_SIZE=64
|
|
|
|
portinstall-riscv64: portinstall-pkg .PHONY
|
|
.if !exists(/usr/local/share/opensbi/lp64/generic/firmware/fw_jump.elf)
|
|
env ASSUME_ALWAYS_YES=yes pkg install sysutils/opensbi
|
|
.endif
|
|
.if !exists(/usr/local/share/u-boot/u-boot-qemu-riscv64/u-boot.bin)
|
|
env ASSUME_ALWAYS_YES=yes pkg install sysutils/u-boot-qemu-riscv64
|
|
.endif
|
|
|
|
# NOTE: Nothing should be changed below this line unless explicitly required.
|
|
|
|
ci-buildworld-riscv64: ci-buildworld .PHONY
|
|
|
|
ci-buildkernel-riscv64: ci-buildkernel .PHONY
|
|
|
|
ci-buildimage-riscv64: ci-buildimage .PHONY
|
|
|
|
ci-runtest-riscv64: ci-runtest .PHONY
|