Skip to content

qemu: Handle /usr/libexec/qemu-kvm for RHEL systems #1

qemu: Handle /usr/libexec/qemu-kvm for RHEL systems

qemu: Handle /usr/libexec/qemu-kvm for RHEL systems #1

Workflow file for this run

name: CI (c10s)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
container:
image: quay.io/centos/centos:stream10
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
dnf clean all
dnf -y install dnf-utils && dnf config-manager --set-enabled crb
dnf install -y pkgconfig go-md2man gcc make openssl-devel openssh-clients
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: taiki-e/install-action@nextest
- uses: taiki-e/install-action@just
- name: Cache build artifacts
uses: Swatinem/rust-cache@v2
- name: Build
run: just validate && just build
- name: Run unit tests
run: just unit
- name: Create integration test archive
run: cargo nextest archive --release -P integration -p integration-tests --archive-file integration-tests.tar.zst
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: bcvk-build
path: |
target/release/bcvk
integration-tests.tar.zst
retention-days: 1
test:
needs: [build]
runs-on: ubuntu-24.04
container:
image: quay.io/centos-bootc/centos-bootc:stream10
options: "--privileged --device=/dev/kvm --volume /var/lib/containers"
env:
LIBVIRT_DEFAULT_URI: "qemu:///system"
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: bcvk-build
- name: List artifacts
run: |
echo "Root directory:"
ls -la
echo "Looking for target directory:"
find . -name bcvk -o -name "*.tar.zst" | head -20
- name: Make binary executable
run: |
if [ -f bcvk ]; then
chmod +x bcvk
elif [ -f target/release/bcvk ]; then
chmod +x target/release/bcvk
ln -s target/release/bcvk bcvk
else
echo "ERROR: bcvk binary not found"
exit 1
fi
- name: Install runtime dependencies
run: |
dnf clean all
dnf install -y libvirt-daemon libvirt-daemon-driver-qemu libvirt-client qemu-kvm virtiofsd
# Ensure we have $HOME
mkdir -p /var/roothome
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- name: Pull test images
run: podman pull -q quay.io/fedora/fedora-bootc:42 quay.io/centos-bootc/centos-bootc:stream9 quay.io/centos-bootc/centos-bootc:stream10
- name: Run integration tests
run: |
export BCVK_PATH=$(pwd)/bcvk
# Note: we only run the ephermeral tests until we debug libvirt-in-container above
cargo nextest run --archive-file integration-tests.tar.zst ephemeral
- name: Upload junit XML
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-junit-xml
path: target/nextest/integration/junit.xml
retention-days: 7