Skip to content

zfs-qemu-packages

zfs-qemu-packages #38

# This workflow is used to build and test RPM packages. It is intended to be
# used to build RPMs for ZFS releases, and then test install them from a
# repository.
name: zfs-qemu-packages
on:
workflow_dispatch:
inputs:
dkms:
type: boolean
required: false
default: false
description: 'Build DKMS RPMs in addition to KMOD RPMs'
save_rpms:
type: boolean
required: false
default: false
description: 'Build DKMS & KMOD RPMs and save to artifacts'
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: ['almalinux9', 'fedora41']
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
timeout-minutes: 30
run: |
ARGS=""
if [ ${{ github.event.inputs.dkms }} == "true" ] ; then
ARGS+=" --dkms"
fi
.github/workflows/scripts/qemu-4-build.sh --repo --release $ARGS ${{ matrix.os }}
- name: Prepare artifacts
if: always()
timeout-minutes: 10
run: |
rsync -a zfs@vm0:/tmp/repo /tmp
.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: /tmp/${{ 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: "Combine RPMs"
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
echo "contents $i:"
tar tvf $i
tar -xf $i -C /tmp
done
ls -l /tmp
tar -cf all-repo.tar -C /tmp repo
- 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