diff mbox series

[ovs-dev,v2] github: Test building Fedora RPMs.

Message ID 20230405194144.547697-1-i.maximets@ovn.org
State Accepted
Commit 75eae65602c8b665d882bfb9bb8259259ad95a4a
Headers show
Series [ovs-dev,v2] github: Test building Fedora RPMs. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Ilya Maximets April 5, 2023, 7:41 p.m. UTC
Testing that RPMs can be built to catch possible spec file
issues like missing dependencies.

GitHub seems to have an agreement with Docker Hub about rate
limiting of image downloads, so it should not affect us.
We may switch to quay.io if that will ever become a problem
in the future.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---

Version 2:
  * Changed the task name from build-rpm-fedora to build-linux-rpm. [David]
  * Switched to ubuntu-latest.  [David]

 .github/workflows/build-and-test.yml | 37 ++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

David Marchand April 6, 2023, 6:53 a.m. UTC | #1
On Wed, Apr 5, 2023 at 9:41 PM Ilya Maximets <i.maximets@ovn.org> wrote:
>
> Testing that RPMs can be built to catch possible spec file
> issues like missing dependencies.
>
> GitHub seems to have an agreement with Docker Hub about rate
> limiting of image downloads, so it should not affect us.
> We may switch to quay.io if that will ever become a problem
> in the future.
>
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Eelco Chaudron April 6, 2023, 10 a.m. UTC | #2
On 5 Apr 2023, at 21:41, Ilya Maximets wrote:

> Testing that RPMs can be built to catch possible spec file
> issues like missing dependencies.
>
> GitHub seems to have an agreement with Docker Hub about rate
> limiting of image downloads, so it should not affect us.
> We may switch to quay.io if that will ever become a problem
> in the future.
>
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>

These changes look good to me, did a quick test, and works in my GitHub action.

Acked-by: Eelco Chaudron <echaudro@redhat.com>
Ilya Maximets April 6, 2023, 10:08 p.m. UTC | #3
On 4/6/23 12:00, Eelco Chaudron wrote:
> 
> 
> On 5 Apr 2023, at 21:41, Ilya Maximets wrote:
> 
>> Testing that RPMs can be built to catch possible spec file
>> issues like missing dependencies.
>>
>> GitHub seems to have an agreement with Docker Hub about rate
>> limiting of image downloads, so it should not affect us.
>> We may switch to quay.io if that will ever become a problem
>> in the future.
>>
>> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> 
> These changes look good to me, did a quick test, and works in my GitHub action.
> 
> Acked-by: Eelco Chaudron <echaudro@redhat.com>
> 
> 

Thanks, David and Eelco!  Applied.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index 82675b973..39649c1b5 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -242,3 +242,40 @@  jobs:
       with:
         name: deb-packages-${{ matrix.dpdk }}-dpdk
         path: '/home/runner/work/ovs/*.deb'
+
+  build-linux-rpm:
+    name: linux rpm fedora
+    runs-on: ubuntu-latest
+    container: fedora:37
+    timeout-minutes: 30
+
+    strategy:
+      fail-fast: false
+
+    steps:
+    - name: checkout
+      uses: actions/checkout@v3
+    - name: install dependencies
+      run: |
+        dnf install -y rpm-build dnf-plugins-core
+        sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in \
+            > /tmp/ovs.spec
+        dnf builddep -y /tmp/ovs.spec
+        rm -f /tmp/ovs.spec
+
+    - name: configure
+      run:  ./boot.sh && ./configure
+
+    - name: build
+      run:  make rpm-fedora
+
+    - name: install
+      run:  dnf install -y rpm/rpmbuild/RPMS/*/*.rpm
+
+    - name: upload rpm packages
+      uses: actions/upload-artifact@v3
+      with:
+        name: rpm-packages
+        path: |
+          rpm/rpmbuild/SRPMS/*.rpm
+          rpm/rpmbuild/RPMS/*/*.rpm