diff --git a/.github/workflows/rpmbuild.yml b/.github/workflows/rpmbuild.yml new file mode 100644 index 000000000..bb4f397c6 --- /dev/null +++ b/.github/workflows/rpmbuild.yml @@ -0,0 +1,33 @@ +name: RPM build + +on: + push: + branches: [ main, 'stable/**' ] + pull_request: + branches: [ '**' ] + +jobs: + rpm: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + container: + - fedora:latest + - fedora:rawhide + - rockylinux:9 + container: + image: ${{ matrix.container }} + steps: + - uses: actions/checkout@v2 + - name: Build & Test + run: | + cat /etc/os-release + dnf -y install dnf-plugins-core rpmdevtools # for 'dnf builddep' + dnf -y install epel-release || true + dnf config-manager --set-enabled crb || true # Meson/CMocka on EL9 + dnf -y install centos-release-nfv-openvswitch || true # OVS on EL9 + dnf -y builddep rpm/netplan.spec + adduser test + chown -R test:test . + su test -c 'rpmbuild -bi --build-in-place rpm/netplan.spec' diff --git a/rpm/netplan.spec b/rpm/netplan.spec index 2325c786e..81dce1e66 100644 --- a/rpm/netplan.spec +++ b/rpm/netplan.spec @@ -40,12 +40,15 @@ BuildRequires: %{_bindir}/find BuildRequires: %{_sbindir}/ip BuildRequires: pkgconfig(cmocka) BuildRequires: python3dist(coverage) +BuildRequires: dbus-x11 BuildRequires: python3dist(netifaces) BuildRequires: python3dist(pycodestyle) BuildRequires: python3dist(pyflakes) BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pytest-cov) BuildRequires: python3dist(pyyaml) BuildRequires: python3dist(rich) +BuildRequires: %{_bindir}/ovs-vsctl # /usr/sbin/netplan is a Python 3 script that requires Python modules Requires: python3dist(netifaces)