From a68a9c726dc3daecac7586262c9cfabd3431f54b Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Wed, 5 Nov 2025 18:56:17 +0100 Subject: [PATCH] CI: Update FreeBSD versions and ci-type handling Update FreeBSD versions: - add FreeBSD 15.0-STABLE - add FreeBSD 16.0-CURRENT So we use the latest versions of each line now: - Freebsd 14.3 (RELEASE) - FreeBSD 15.0 (STABLE) - FreeBSD 16.0 (CURRENT) In commits - you may specify which type of CI should run: - ZFS-CI-Type: quick - ZFS-CI-Type: linux - ZFS-CI-Type: freebsd - ZFS-CI-Type: full Reviewed-by: Alexx Saver Reviewed-by: Alexander Motin Reviewed-by: Brian Behlendorf Signed-off-by: Tino Reichardt Closes #17896 --- .github/workflows/scripts/generate-ci-type.py | 10 +++-- .github/workflows/scripts/qemu-2-start.sh | 22 ++++++----- .github/workflows/zfs-qemu-packages.yml | 2 +- .github/workflows/zfs-qemu.yml | 38 ++++++++++++------- 4 files changed, 45 insertions(+), 27 deletions(-) diff --git a/.github/workflows/scripts/generate-ci-type.py b/.github/workflows/scripts/generate-ci-type.py index 08021aabc..059d6ad38 100755 --- a/.github/workflows/scripts/generate-ci-type.py +++ b/.github/workflows/scripts/generate-ci-type.py @@ -7,7 +7,7 @@ Prints "quick" if (explicity required by user): - the *last* commit message contains 'ZFS-CI-Type: quick' or if (heuristics): - the files changed are not in the list of specified directories, and -- all commit messages do not contain 'ZFS-CI-Type: full' +- all commit messages do not contain 'ZFS-CI-Type: (full|linux|freebsd)' Otherwise prints "full". """ @@ -70,7 +70,7 @@ if __name__ == '__main__': for line in last_commit_message_raw.stdout.decode().splitlines(): if line.strip().lower() == 'zfs-ci-type: quick': - output_type('quick', f'explicitly requested by HEAD commit {head}') + output_type('quick', f'requested by HEAD commit {head}') # check all commit messages all_commit_message_raw = subprocess.run([ @@ -83,8 +83,12 @@ if __name__ == '__main__': for line in all_commit_message: if line.startswith('ZFS-CI-Commit:'): commit_ref = line.lstrip('ZFS-CI-Commit:').rstrip() + if line.strip().lower() == 'zfs-ci-type: freebsd': + output_type('freebsd', f'requested by commit {commit_ref}') + if line.strip().lower() == 'zfs-ci-type: linux': + output_type('linux', f'requested by commit {commit_ref}') if line.strip().lower() == 'zfs-ci-type: full': - output_type('full', f'explicitly requested by commit {commit_ref}') + output_type('full', f'requested by commit {commit_ref}') # check changed files changed_files_raw = subprocess.run([ diff --git a/.github/workflows/scripts/qemu-2-start.sh b/.github/workflows/scripts/qemu-2-start.sh index 422b3e9df..5bdd84ca2 100755 --- a/.github/workflows/scripts/qemu-2-start.sh +++ b/.github/workflows/scripts/qemu-2-start.sh @@ -47,16 +47,15 @@ case "$OS" in 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" ;; + centos-stream10) + OSNAME="CentOS Stream 10" + OSv="centos-stream9" + URL="https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-10-latest.x86_64.qcow2" + ;; debian11) OSNAME="Debian 11" URL="https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2" @@ -83,6 +82,11 @@ case "$OS" in 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" ;; + fedora43) + OSNAME="Fedora 43" + OSv="fedora-unknown" + URL="https://download.fedoraproject.org/pub/fedora/linux/releases/43/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-43-1.6.x86_64.qcow2" + ;; freebsd13-5r) FreeBSD="13.5-RELEASE" OSNAME="FreeBSD $FreeBSD" @@ -95,8 +99,8 @@ case "$OS" in FreeBSD="14.2-RELEASE" OSNAME="FreeBSD $FreeBSD" OSv="freebsd14.0" - KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz" URLxz="$FREEBSD_REL/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI.raw.xz" + KSRC="$FREEBSD_REL/../amd64/$FreeBSD/src.txz" ;; freebsd14-3r) FreeBSD="14.3-RELEASE" @@ -120,8 +124,8 @@ case "$OS" in URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz" KSRC="$FREEBSD_SNAP/../amd64/$FreeBSD/src.txz" ;; - freebsd15-0c) - FreeBSD="15.0-ALPHA4" + freebsd15-0s) + FreeBSD="15.0-STABLE" OSNAME="FreeBSD $FreeBSD" OSv="freebsd14.0" URLxz="$FREEBSD_SNAP/$FreeBSD/amd64/Latest/FreeBSD-$FreeBSD-amd64-BASIC-CI-ufs.raw.xz" diff --git a/.github/workflows/zfs-qemu-packages.yml b/.github/workflows/zfs-qemu-packages.yml index d8a95954f..6367fb3a6 100644 --- a/.github/workflows/zfs-qemu-packages.yml +++ b/.github/workflows/zfs-qemu-packages.yml @@ -52,7 +52,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['almalinux8', 'almalinux9', 'almalinux10', 'fedora41', 'fedora42'] + os: ['almalinux8', 'almalinux9', 'almalinux10', 'fedora41', 'fedora42', 'fedora43'] runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/zfs-qemu.yml b/.github/workflows/zfs-qemu.yml index 3b164548f..dad7611cf 100644 --- a/.github/workflows/zfs-qemu.yml +++ b/.github/workflows/zfs-qemu.yml @@ -29,24 +29,34 @@ jobs: - name: Generate OS config and CI type id: os run: | - FULL_OS='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian12", "debian13", "fedora41", "fedora42", "freebsd13-5r", "freebsd14-3s", "freebsd15-0c", "ubuntu22", "ubuntu24"]' - QUICK_OS='["almalinux8", "almalinux9", "almalinux10", "debian12", "fedora42", "freebsd14-3s", "ubuntu24"]' + ci_type="default" + # 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 + + case "$ci_type" in + quick) + os_selection='["almalinux8", "almalinux9", "almalinux10", "debian12", "fedora42", "freebsd15-0s", "ubuntu24"]' + ;; + linux) + os_selection='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian11", "debian12", "debian13", "fedora41", "fedora42", "fedora43", "ubuntu22", "ubuntu24"]' + ;; + freebsd) + os_selection='["freebsd13-5r", "freebsd14-2r", "freebsd14-3r", "freebsd13-5s", "freebsd14-3s", "freebsd15-0s", "freebsd16-0c"]' + ;; + *) + # default list + os_selection='["almalinux8", "almalinux9", "almalinux10", "centos-stream9", "centos-stream10", "debian12", "debian13", "fedora42", "fedora43", "freebsd14-3r", "freebsd15-0s", "freebsd16-0c", "ubuntu22", "ubuntu24"]' + ;; + esac if ${{ github.event.inputs.fedora_kernel_ver != '' }}; then - # They specified a custom kernel version for Fedora. Use only - # Fedora runners. + # 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 @@ -62,13 +72,13 @@ jobs: strategy: fail-fast: false matrix: - # rhl: almalinux8, almalinux9, centos-stream9, fedora4x + # rhl: almalinux8, almalinux9, centos-streamX, fedora4x # debian: debian12, debian13, ubuntu22, ubuntu24 # misc: archlinux, tumbleweed - # FreeBSD variants of 2025-06: + # FreeBSD variants of november 2025: # FreeBSD Release: freebsd13-5r, freebsd14-2r, freebsd14-3r - # FreeBSD Stable: freebsd13-5s, freebsd14-3s - # FreeBSD Current: freebsd15-0c, freebsd16-0c + # FreeBSD Stable: freebsd13-5s, freebsd14-3s, freebsd15-0s + # FreeBSD Current: freebsd16-0c os: ${{ fromJson(needs.test-config.outputs.test_os) }} runs-on: ubuntu-24.04 steps: