diff --git a/.github/workflows/scripts/qemu-2-start.sh b/.github/workflows/scripts/qemu-2-start.sh index 72f9f8c34ca6..2ea282232d21 100755 --- a/.github/workflows/scripts/qemu-2-start.sh +++ b/.github/workflows/scripts/qemu-2-start.sh @@ -1,254 +1,259 @@ #!/usr/bin/env bash ###################################################################### # 2) start qemu with some operating system, init via cloud-init ###################################################################### set -eu # short name used in zfs-qemu.yml OS="$1" # OS variant (virt-install --os-variant list) OSv=$OS # compressed with .zst extension REPO="https://github.com/mcmilk/openzfs-freebsd-images" FREEBSD="$REPO/releases/download/v2025-04-13" URLzs="" # Ubuntu mirrors UBMIRROR="https://cloud-images.ubuntu.com" #UBMIRROR="https://mirrors.cloud.tencent.com/ubuntu-cloud-images" #UBMIRROR="https://mirror.citrahost.com/ubuntu-cloud-images" # default nic model for vm's NIC="virtio" case "$OS" in almalinux8) OSNAME="AlmaLinux 8" URL="https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/AlmaLinux-8-GenericCloud-latest.x86_64.qcow2" ;; almalinux9) OSNAME="AlmaLinux 9" URL="https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2" ;; + almalinux10) + OSNAME="AlmaLinux 10" + OSv="almalinux9" + URL="https://repo.almalinux.org/almalinux/10/cloud/x86_64/images/AlmaLinux-10-GenericCloud-latest.x86_64.qcow2" + ;; archlinux) OSNAME="Archlinux" URL="https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2" ;; centos-stream10) OSNAME="CentOS Stream 10" # TODO: #16903 Overwrite OSv to stream9 for virt-install until it's added to osinfo OSv="centos-stream9" URL="https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-10-latest.x86_64.qcow2" ;; centos-stream9) OSNAME="CentOS Stream 9" URL="https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-latest.x86_64.qcow2" ;; debian11) OSNAME="Debian 11" URL="https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2" ;; debian12) OSNAME="Debian 12" URL="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2" ;; fedora40) OSNAME="Fedora 40" OSv="fedora-unknown" URL="https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2" ;; fedora41) OSNAME="Fedora 41" OSv="fedora-unknown" URL="https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2" ;; fedora42) OSNAME="Fedora 42" OSv="fedora-unknown" URL="https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2" ;; freebsd13-4r) OSNAME="FreeBSD 13.4-RELEASE" OSv="freebsd13.0" URLzs="$FREEBSD/amd64-freebsd-13.4-RELEASE.qcow2.zst" BASH="/usr/local/bin/bash" NIC="rtl8139" ;; freebsd13-5r) OSNAME="FreeBSD 13.5-RELEASE" OSv="freebsd13.0" URLzs="$FREEBSD/amd64-freebsd-13.5-RELEASE.qcow2.zst" BASH="/usr/local/bin/bash" NIC="rtl8139" ;; freebsd14-1r) OSNAME="FreeBSD 14.1-RELEASE" OSv="freebsd14.0" URLzs="$FREEBSD/amd64-freebsd-14.1-RELEASE.qcow2.zst" BASH="/usr/local/bin/bash" ;; freebsd14-2r) OSNAME="FreeBSD 14.2-RELEASE" OSv="freebsd14.0" URLzs="$FREEBSD/amd64-freebsd-14.2-RELEASE.qcow2.zst" BASH="/usr/local/bin/bash" ;; freebsd13-5s) OSNAME="FreeBSD 13.5-STABLE" OSv="freebsd13.0" URLzs="$FREEBSD/amd64-freebsd-13.5-STABLE.qcow2.zst" BASH="/usr/local/bin/bash" NIC="rtl8139" ;; freebsd14-2s) OSNAME="FreeBSD 14.2-STABLE" OSv="freebsd14.0" URLzs="$FREEBSD/amd64-freebsd-14.2-STABLE.qcow2.zst" BASH="/usr/local/bin/bash" ;; freebsd15-0c) OSNAME="FreeBSD 15.0-CURRENT" OSv="freebsd14.0" URLzs="$FREEBSD/amd64-freebsd-15.0-CURRENT.qcow2.zst" BASH="/usr/local/bin/bash" ;; tumbleweed) OSNAME="openSUSE Tumbleweed" OSv="opensusetumbleweed" MIRROR="http://opensuse-mirror-gce-us.susecloud.net" URL="$MIRROR/tumbleweed/appliances/openSUSE-MicroOS.x86_64-OpenStack-Cloud.qcow2" ;; ubuntu22) OSNAME="Ubuntu 22.04" OSv="ubuntu22.04" URL="$UBMIRROR/jammy/current/jammy-server-cloudimg-amd64.img" ;; ubuntu24) OSNAME="Ubuntu 24.04" OSv="ubuntu24.04" URL="$UBMIRROR/noble/current/noble-server-cloudimg-amd64.img" ;; *) echo "Wrong value for OS variable!" exit 111 ;; esac # environment file ENV="/var/tmp/env.txt" echo "ENV=$ENV" >> $ENV # result path echo 'RESPATH="/var/tmp/test_results"' >> $ENV # FreeBSD 13 has problems with: e1000 and virtio echo "NIC=$NIC" >> $ENV # freebsd15 -> used in zfs-qemu.yml echo "OS=$OS" >> $ENV # freebsd14.0 -> used for virt-install echo "OSv=\"$OSv\"" >> $ENV # FreeBSD 15 (Current) -> used for summary echo "OSNAME=\"$OSNAME\"" >> $ENV # default vm count for testings VMs=2 echo "VMs=\"$VMs\"" >> $ENV # default cpu count for testing vm's CPU=2 echo "CPU=\"$CPU\"" >> $ENV sudo mkdir -p "/mnt/tests" sudo chown -R $(whoami) /mnt/tests # we are downloading via axel, curl and wget are mostly slower and # require more return value checking IMG="/mnt/tests/cloudimg.qcow2" if [ ! -z "$URLzs" ]; then echo "Loading image $URLzs ..." time axel -q -o "$IMG.zst" "$URLzs" zstd -q -d --rm "$IMG.zst" else echo "Loading image $URL ..." time axel -q -o "$IMG" "$URL" fi DISK="/dev/zvol/zpool/openzfs" FORMAT="raw" sudo zfs create -ps -b 64k -V 80g zpool/openzfs while true; do test -b $DISK && break; sleep 1; done echo "Importing VM image to zvol..." sudo qemu-img dd -f qcow2 -O raw if=$IMG of=$DISK bs=4M rm -f $IMG PUBKEY=$(cat ~/.ssh/id_ed25519.pub) cat < /tmp/user-data #cloud-config fqdn: $OS users: - name: root shell: $BASH - name: zfs sudo: ALL=(ALL) NOPASSWD:ALL shell: $BASH ssh_authorized_keys: - $PUBKEY growpart: mode: auto devices: ['/'] ignore_growroot_disabled: false EOF sudo virsh net-update default add ip-dhcp-host \ "" --live --config sudo virt-install \ --os-variant $OSv \ --name "openzfs" \ --cpu host-passthrough \ --virt-type=kvm --hvm \ --vcpus=4,sockets=1 \ --memory $((1024*12)) \ --memballoon model=virtio \ --graphics none \ --network bridge=virbr0,model=$NIC,mac='52:54:00:83:79:00' \ --cloud-init user-data=/tmp/user-data \ --disk $DISK,bus=virtio,cache=none,format=$FORMAT,driver.discard=unmap \ --import --noautoconsole >/dev/null # enable KSM on Linux if [ ${OS:0:7} != "freebsd" ]; then sudo virsh dommemstat --domain "openzfs" --period 5 sudo virsh node-memory-tune 100 50 1 echo 1 | sudo tee /sys/kernel/mm/ksm/run > /dev/null fi # Give the VMs hostnames so we don't have to refer to them with # hardcoded IP addresses. # # vm0: Initial VM we install dependencies and build ZFS on. # vm1..2 Testing VMs for ((i=0; i<=VMs; i++)); do echo "192.168.122.1$i vm$i" | sudo tee -a /etc/hosts done # in case the directory isn't there already mkdir -p $HOME/.ssh cat <> $HOME/.ssh/config # no questions please StrictHostKeyChecking no # small timeout, used in while loops later ConnectTimeout 1 EOF diff --git a/.github/workflows/scripts/qemu-3-deps-vm.sh b/.github/workflows/scripts/qemu-3-deps-vm.sh index dd923295021c..a581b13c2f58 100755 --- a/.github/workflows/scripts/qemu-3-deps-vm.sh +++ b/.github/workflows/scripts/qemu-3-deps-vm.sh @@ -1,260 +1,260 @@ #!/usr/bin/env bash ###################################################################### # 3) install dependencies for compiling and loading # # $1: OS name (like 'fedora41') # $2: (optional) Experimental Fedora kernel version, like "6.14" to # install instead of Fedora defaults. ###################################################################### set -eu function archlinux() { echo "##[group]Running pacman -Syu" sudo btrfs filesystem resize max / sudo pacman -Syu --noconfirm echo "##[endgroup]" echo "##[group]Install Development Tools" sudo pacman -Sy --noconfirm base-devel bc cpio cryptsetup dhclient dkms \ fakeroot fio gdb inetutils jq less linux linux-headers lsscsi nfs-utils \ parted pax perf python-packaging python-setuptools qemu-guest-agent ksh \ samba sysstat rng-tools rsync wget xxhash echo "##[endgroup]" } function debian() { export DEBIAN_FRONTEND="noninteractive" echo "##[group]Running apt-get update+upgrade" sudo apt-get update -y sudo apt-get upgrade -y echo "##[endgroup]" echo "##[group]Install Development Tools" sudo apt-get install -y \ acl alien attr autoconf bc cpio cryptsetup curl dbench dh-python dkms \ fakeroot fio gdb gdebi git ksh lcov isc-dhcp-client jq libacl1-dev \ libaio-dev libattr1-dev libblkid-dev libcurl4-openssl-dev libdevmapper-dev \ libelf-dev libffi-dev libmount-dev libpam0g-dev libselinux-dev libssl-dev \ libtool libtool-bin libudev-dev libunwind-dev linux-headers-$(uname -r) \ lsscsi nfs-kernel-server pamtester parted python3 python3-all-dev \ python3-cffi python3-dev python3-distlib python3-packaging \ python3-setuptools python3-sphinx qemu-guest-agent rng-tools rpm2cpio \ rsync samba sysstat uuid-dev watchdog wget xfslibs-dev xxhash zlib1g-dev echo "##[endgroup]" } function freebsd() { export ASSUME_ALWAYS_YES="YES" echo "##[group]Install Development Tools" sudo pkg install -y autoconf automake autotools base64 checkbashisms fio \ gdb gettext gettext-runtime git gmake gsed jq ksh93 lcov libtool lscpu \ pkgconf python python3 pamtester pamtester qemu-guest-agent rsync xxhash sudo pkg install -xy \ '^samba4[[:digit:]]+$' \ '^py3[[:digit:]]+-cffi$' \ '^py3[[:digit:]]+-sysctl$' \ '^py3[[:digit:]]+-setuptools$' \ '^py3[[:digit:]]+-packaging$' echo "##[endgroup]" } # common packages for: almalinux, centos, redhat function rhel() { echo "##[group]Running dnf update" echo "max_parallel_downloads=10" | sudo -E tee -a /etc/dnf/dnf.conf sudo dnf clean all sudo dnf update -y --setopt=fastestmirror=1 --refresh echo "##[endgroup]" echo "##[group]Install Development Tools" # Alma wants "Development Tools", Fedora 41 wants "development-tools" if ! sudo dnf group install -y "Development Tools" ; then echo "Trying 'development-tools' instead of 'Development Tools'" sudo dnf group install -y development-tools fi sudo dnf install -y \ acl attr bc bzip2 cryptsetup curl dbench dkms elfutils-libelf-devel fio \ gdb git jq kernel-rpm-macros ksh libacl-devel libaio-devel \ libargon2-devel libattr-devel libblkid-devel libcurl-devel libffi-devel \ ncompress libselinux-devel libtirpc-devel libtool libudev-devel \ libuuid-devel lsscsi mdadm nfs-utils openssl-devel pam-devel pamtester \ parted perf python3 python3-cffi python3-devel python3-packaging \ kernel-devel python3-setuptools qemu-guest-agent rng-tools rpcgen \ rpm-build rsync samba sysstat systemd watchdog wget xfsprogs-devel xxhash \ zlib-devel echo "##[endgroup]" } function tumbleweed() { echo "##[group]Running zypper is TODO!" sleep 23456 echo "##[endgroup]" } # $1: Kernel version to install (like '6.14rc7') function install_fedora_experimental_kernel { our_version="$1" sudo dnf -y copr enable @kernel-vanilla/stable sudo dnf -y copr enable @kernel-vanilla/mainline all="$(sudo dnf list --showduplicates kernel-*)" echo "Available versions:" echo "$all" # You can have a bunch of minor variants of the version we want '6.14'. # Pick the newest variant (sorted by version number). specific_version=$(echo "$all" | grep $our_version | awk '{print $2}' | sort -V | tail -n 1) list="$(echo "$all" | grep $specific_version | grep -Ev 'kernel-rt|kernel-selftests|kernel-debuginfo' | sed 's/.x86_64//g' | awk '{print $1"-"$2}')" sudo dnf install -y $list sudo dnf -y copr disable @kernel-vanilla/stable sudo dnf -y copr disable @kernel-vanilla/mainline } # Install dependencies case "$1" in almalinux8) echo "##[group]Enable epel and powertools repositories" sudo dnf config-manager -y --set-enabled powertools sudo dnf install -y epel-release echo "##[endgroup]" rhel echo "##[group]Install kernel-abi-whitelists" sudo dnf install -y kernel-abi-whitelists echo "##[endgroup]" ;; - almalinux9|centos-stream9|centos-stream10) + almalinux9|almalinux10|centos-stream9|centos-stream10) echo "##[group]Enable epel and crb repositories" sudo dnf config-manager -y --set-enabled crb sudo dnf install -y epel-release echo "##[endgroup]" rhel echo "##[group]Install kernel-abi-stablelists" sudo dnf install -y kernel-abi-stablelists echo "##[endgroup]" ;; archlinux) archlinux ;; debian*) echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections debian echo "##[group]Install Debian specific" sudo apt-get install -yq linux-perf dh-sequence-dkms echo "##[endgroup]" ;; fedora*) rhel sudo dnf install -y libunwind-devel # Fedora 42+ moves /usr/bin/script from 'util-linux' to 'util-linux-script' sudo dnf install -y util-linux-script || true # Optional: Install an experimental kernel ($2 = kernel version) if [ -n "${2:-}" ] ; then install_fedora_experimental_kernel "$2" fi ;; freebsd*) freebsd ;; tumbleweed) tumbleweed ;; ubuntu*) debian echo "##[group]Install Ubuntu specific" sudo apt-get install -yq linux-tools-common libtirpc-dev \ linux-modules-extra-$(uname -r) sudo apt-get install -yq dh-sequence-dkms echo "##[endgroup]" echo "##[group]Delete Ubuntu OpenZFS modules" for i in $(find /lib/modules -name zfs -type d); do sudo rm -rvf $i; done echo "##[endgroup]" ;; esac # This script is used for checkstyle + zloop deps also. # Install only the needed packages and exit - when used this way. test -z "${ONLY_DEPS:-}" || exit 0 # Start services echo "##[group]Enable services" case "$1" in freebsd*) # add virtio things echo 'virtio_load="YES"' | sudo -E tee -a /boot/loader.conf for i in balloon blk console random scsi; do echo "virtio_${i}_load=\"YES\"" | sudo -E tee -a /boot/loader.conf done echo "fdescfs /dev/fd fdescfs rw 0 0" | sudo -E tee -a /etc/fstab sudo -E mount /dev/fd sudo -E touch /etc/zfs/exports sudo -E sysrc mountd_flags="/etc/zfs/exports" echo '[global]' | sudo -E tee /usr/local/etc/smb4.conf >/dev/null sudo -E service nfsd enable sudo -E service qemu-guest-agent enable sudo -E service samba_server enable ;; debian*|ubuntu*) sudo -E systemctl enable nfs-kernel-server sudo -E systemctl enable qemu-guest-agent sudo -E systemctl enable smbd ;; *) # All other linux distros sudo -E systemctl enable nfs-server sudo -E systemctl enable qemu-guest-agent sudo -E systemctl enable smb ;; esac echo "##[endgroup]" # Setup Kernel cmdline CMDLINE="console=tty0 console=ttyS0,115200n8" CMDLINE="$CMDLINE selinux=0" CMDLINE="$CMDLINE random.trust_cpu=on" CMDLINE="$CMDLINE no_timer_check" case "$1" in almalinux*|centos*|fedora*) GRUB_CFG="/boot/grub2/grub.cfg" GRUB_MKCONFIG="grub2-mkconfig" CMDLINE="$CMDLINE biosdevname=0 net.ifnames=0" echo 'GRUB_SERIAL_COMMAND="serial --speed=115200"' \ | sudo tee -a /etc/default/grub >/dev/null ;; ubuntu24) GRUB_CFG="/boot/grub/grub.cfg" GRUB_MKCONFIG="grub-mkconfig" echo 'GRUB_DISABLE_OS_PROBER="false"' \ | sudo tee -a /etc/default/grub >/dev/null ;; *) GRUB_CFG="/boot/grub/grub.cfg" GRUB_MKCONFIG="grub-mkconfig" ;; esac case "$1" in archlinux|freebsd*) true ;; *) echo "##[group]Edit kernel cmdline" sudo sed -i -e '/^GRUB_CMDLINE_LINUX/d' /etc/default/grub || true echo "GRUB_CMDLINE_LINUX=\"$CMDLINE\"" \ | sudo tee -a /etc/default/grub >/dev/null sudo $GRUB_MKCONFIG -o $GRUB_CFG echo "##[endgroup]" ;; esac # reset cloud-init configuration and poweroff sudo cloud-init clean --logs sleep 2 && sudo poweroff & exit 0 diff --git a/.github/workflows/zfs-qemu-packages.yml b/.github/workflows/zfs-qemu-packages.yml index a1c593972764..528cc1dcd989 100644 --- a/.github/workflows/zfs-qemu-packages.yml +++ b/.github/workflows/zfs-qemu-packages.yml @@ -1,140 +1,140 @@ # This workflow is used to build and test RPM packages. It is a # 'workflow_dispatch' workflow, which means it gets run manually. # # The workflow has a dropdown menu with two options: # # Build RPMs - Build release RPMs and tarballs and put them into an artifact # ZIP file. The directory structure used in the ZIP file mirrors # the ZFS yum repo. # # Test repo - Test install the ZFS RPMs from the ZFS repo. On EL distos, this # will do a DKMS and KMOD test install from both the regular and # testing repos. On Fedora, it will do a DKMS install from the # regular repo. All test install results will be displayed in the # Summary page. Note that the workflow provides an optional text # text box where you can specify the full URL to an alternate repo. # If left blank, it will install from the default repo from the # zfs-release RPM (http://download.zfsonlinux.org). # # Most users will never need to use this workflow. It will be used primary by # ZFS admins for building and testing releases. # name: zfs-qemu-packages on: workflow_dispatch: inputs: test_type: type: choice required: false default: "Build RPMs" description: "Build RPMs or test the repo?" options: - "Build RPMs" - "Test repo" repo_url: type: string required: false default: "" description: "(optional) repo URL (blank: use http://download.zfsonlinux.org)" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: zfs-qemu-packages-jobs: name: qemu-VMs strategy: fail-fast: false matrix: - os: ['almalinux8', 'almalinux9', 'fedora40', 'fedora41', 'fedora42'] + os: ['almalinux8', 'almalinux9', 'almalinux10', 'fedora40', 'fedora41', 'fedora42'] runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Setup QEMU timeout-minutes: 10 run: .github/workflows/scripts/qemu-1-setup.sh - name: Start build machine timeout-minutes: 10 run: .github/workflows/scripts/qemu-2-start.sh ${{ matrix.os }} - name: Install dependencies timeout-minutes: 20 run: | .github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }} - name: Build modules or Test repo timeout-minutes: 30 run: | set -e if [ "${{ github.event.inputs.test_type }}" == "Test repo" ] ; then # Bring VM back up and copy over zfs source .github/workflows/scripts/qemu-prepare-for-build.sh mkdir -p /tmp/repo ssh zfs@vm0 '$HOME/zfs/.github/workflows/scripts/qemu-test-repo-vm.sh' ${{ github.event.inputs.repo_url }} else .github/workflows/scripts/qemu-4-build.sh --repo --release --dkms --tarball ${{ matrix.os }} fi - name: Prepare artifacts if: always() timeout-minutes: 10 run: | rsync -a zfs@vm0:/tmp/repo /tmp || true .github/workflows/scripts/replace-dupes-with-symlinks.sh /tmp/repo tar -cf ${{ matrix.os }}-repo.tar -C /tmp repo - uses: actions/upload-artifact@v4 id: artifact-upload if: always() with: name: ${{ matrix.os }}-repo path: ${{ matrix.os }}-repo.tar compression-level: 0 retention-days: 2 if-no-files-found: ignore combine_repos: if: always() needs: [zfs-qemu-packages-jobs] name: "Results" runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 id: artifact-download if: always() - name: Test Summary if: always() run: | for i in $(find . -type f -iname "*.tar") ; do tar -xf $i -C /tmp done tar -cf all-repo.tar -C /tmp repo # If we're installing from a repo, print out the summary of the versions # that got installed using Markdown. if [ "${{ github.event.inputs.test_type }}" == "Test repo" ] ; then cd /tmp/repo for i in $(ls *.txt) ; do nicename="$(echo $i | sed 's/.txt//g; s/-/ /g')" echo "### $nicename" >> $GITHUB_STEP_SUMMARY echo "|repo|RPM|URL|" >> $GITHUB_STEP_SUMMARY echo "|:---|:---|:---|" >> $GITHUB_STEP_SUMMARY awk '{print "|"$1"|"$2"|"$3"|"}' $i >> $GITHUB_STEP_SUMMARY done fi - uses: actions/upload-artifact@v4 id: artifact-upload2 if: always() with: name: all-repo path: all-repo.tar compression-level: 0 retention-days: 5 if-no-files-found: ignore diff --git a/.github/workflows/zfs-qemu.yml b/.github/workflows/zfs-qemu.yml index 216dae2d0a1f..7c0f451bea09 100644 --- a/.github/workflows/zfs-qemu.yml +++ b/.github/workflows/zfs-qemu.yml @@ -1,193 +1,193 @@ name: zfs-qemu on: push: pull_request: workflow_dispatch: inputs: include_stream9: type: boolean required: false default: false description: 'Test on CentOS 9 stream' include_stream10: type: boolean required: false default: false description: 'Test on CentOS 10 stream' fedora_kernel_ver: type: string required: false default: "" description: "(optional) Experimental kernel version to install on Fedora (like '6.14' or '6.13.3-0.rc3')" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: test-config: name: Setup runs-on: ubuntu-24.04 outputs: test_os: ${{ steps.os.outputs.os }} ci_type: ${{ steps.os.outputs.ci_type }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Generate OS config and CI type id: os run: | - FULL_OS='["almalinux8", "almalinux9", "debian11", "debian12", "fedora40", "fedora41", "fedora42", "freebsd13-4r", "freebsd14-2s", "freebsd15-0c", "ubuntu22", "ubuntu24"]' - QUICK_OS='["almalinux8", "almalinux9", "debian12", "fedora42", "freebsd14-2r", "ubuntu24"]' + FULL_OS='["almalinux8", "almalinux9", "almalinux10", "debian11", "debian12", "fedora40", "fedora41", "fedora42", "freebsd13-4r", "freebsd14-2s", "freebsd15-0c", "ubuntu22", "ubuntu24"]' + QUICK_OS='["almalinux8", "almalinux9", "almalinux10", "debian12", "fedora42", "freebsd14-2r", "ubuntu24"]' # determine CI type when running on PR ci_type="full" if ${{ github.event_name == 'pull_request' }}; then head=${{ github.event.pull_request.head.sha }} base=${{ github.event.pull_request.base.sha }} ci_type=$(python3 .github/workflows/scripts/generate-ci-type.py $head $base) fi if [ "$ci_type" == "quick" ]; then os_selection="$QUICK_OS" else os_selection="$FULL_OS" fi if [ ${{ github.event.inputs.fedora_kernel_ver }} != "" ] ; then # They specified a custom kernel version for Fedora. Use only # Fedora runners. os_json=$(echo ${os_selection} | jq -c '[.[] | select(startswith("fedora"))]') else # Normal case os_json=$(echo ${os_selection} | jq -c) fi # Add optional runners if [ "${{ github.event.inputs.include_stream9 }}" == 'true' ]; then os_json=$(echo $os_json | jq -c '. += ["centos-stream9"]') fi if [ "${{ github.event.inputs.include_stream10 }}" == 'true' ]; then os_json=$(echo $os_json | jq -c '. += ["centos-stream10"]') fi echo $os_json echo "os=$os_json" >> $GITHUB_OUTPUT echo "ci_type=$ci_type" >> $GITHUB_OUTPUT qemu-vm: name: qemu-x86 needs: [ test-config ] strategy: fail-fast: false matrix: # rhl: almalinux8, almalinux9, centos-stream9, fedora40, fedora41 # debian: debian11, debian12, ubuntu22, ubuntu24 # misc: archlinux, tumbleweed # FreeBSD variants of 2024-12: # FreeBSD Release: freebsd13-4r, freebsd14-2r # FreeBSD Stable: freebsd13-4s, freebsd14-2s # FreeBSD Current: freebsd15-0c os: ${{ fromJson(needs.test-config.outputs.test_os) }} runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Setup QEMU timeout-minutes: 10 run: .github/workflows/scripts/qemu-1-setup.sh - name: Start build machine timeout-minutes: 10 run: .github/workflows/scripts/qemu-2-start.sh ${{ matrix.os }} - name: Install dependencies timeout-minutes: 20 run: .github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }} ${{ github.event.inputs.fedora_kernel_ver }} - name: Build modules timeout-minutes: 30 run: .github/workflows/scripts/qemu-4-build.sh --poweroff --enable-debug ${{ matrix.os }} - name: Setup testing machines timeout-minutes: 5 run: .github/workflows/scripts/qemu-5-setup.sh - name: Run tests timeout-minutes: 270 run: .github/workflows/scripts/qemu-6-tests.sh env: CI_TYPE: ${{ needs.test-config.outputs.ci_type }} - name: Prepare artifacts if: always() timeout-minutes: 10 run: .github/workflows/scripts/qemu-7-prepare.sh - uses: actions/upload-artifact@v4 id: artifact-upload if: always() with: name: Logs-functional-${{ matrix.os }} path: /tmp/qemu-${{ matrix.os }}.tar if-no-files-found: ignore - name: Test Summary if: always() run: .github/workflows/scripts/qemu-8-summary.sh '${{ steps.artifact-upload.outputs.artifact-url }}' cleanup: if: always() name: Cleanup runs-on: ubuntu-latest needs: [ qemu-vm ] steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - uses: actions/download-artifact@v4 - name: Generating summary run: .github/workflows/scripts/qemu-9-summary-page.sh - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 2 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 3 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 4 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 5 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 6 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 7 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 8 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 9 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 10 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 11 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 12 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 13 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 14 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 15 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 16 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 17 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 18 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 19 - uses: actions/upload-artifact@v4 with: name: Summary Files path: out-*