Skip to content

Commit

Permalink
CI: new RPM build tests
Browse files Browse the repository at this point in the history
rpm: add additional test depends
  • Loading branch information
slyon committed Jun 22, 2023
1 parent ebe0db2 commit ec27ce9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/rpmbuild.yml
Original file line number Diff line number Diff line change
@@ -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'
3 changes: 3 additions & 0 deletions rpm/netplan.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ec27ce9

Please sign in to comment.