In order to have up-to-date Fedora RPMs from main
branch add job that will build the RPMs automatically
and publishes them as artifacts. Those artifacts are
available for download to any logged-in user on GH.

Reported-at: https://bugzilla.redhat.com/2178936
Signed-off-by: Ales Musil <[email protected]>
---
 .github/workflows/test.yml | 50 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b41f95936..126666cae 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -201,3 +201,53 @@ jobs:
       with:
         name: logs-osx-clang---disable-ssl
         path: config.log
+
+  build-linux-rpm:
+    name: linux rpm fedora
+    runs-on: ubuntu-latest
+    container: fedora:latest
+    timeout-minutes: 30
+
+    strategy:
+      fail-fast: false
+
+    steps:
+      - name: install dependencies
+        run: dnf install -y dnf-plugins-core git rpm-build
+
+      - name: checkout
+        uses: actions/checkout@v3
+        with:
+          submodules: recursive
+
+      - name: install build dependencies
+        run: |
+          sed -e 's/@VERSION@/0.0.1/' rhel/ovn-fedora.spec.in \
+          > /tmp/ovn.spec
+          dnf builddep -y /tmp/ovn.spec
+
+      - name: configure OvS
+        run: ./boot.sh && ./configure
+        working-directory: ovs
+
+      - name: make dist OvS
+        run: make dist
+        working-directory: ovs
+
+      - name: configure OVN
+        run:  ./boot.sh && ./configure
+
+      - name: make dist OVN
+        run: make dist
+
+      - name: build RPM
+        run:  make rpm-fedora
+
+      - name: upload rpm packages
+        uses: actions/upload-artifact@v3
+        with:
+          name: rpm-packages
+          path: |
+            rpm/rpmbuild/SRPMS/*.rpm
+            rpm/rpmbuild/RPMS/*/*.rpm
+          retention-days: 14
-- 
2.39.2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to