Skip to content

Commit 3e238f9

Browse files
committed
Added el10 workflow
1 parent 118a571 commit 3e238f9

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/rpm-el10.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Build EL10 RPM
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-rpm:
12+
name: Build RPM for EL10
13+
runs-on: ubuntu-latest
14+
container:
15+
image: almalinux:10
16+
17+
steps:
18+
- name: Checkout source
19+
uses: actions/checkout@v4
20+
21+
- name: Install build dependencies
22+
run: |
23+
dnf install -y \
24+
autoconf \
25+
automake \
26+
gcc \
27+
make \
28+
perl-diagnostics \
29+
libibverbs-devel \
30+
librdmacm-devel \
31+
rpm-build \
32+
rpmdevtools \
33+
tar
34+
35+
- name: Set up RPM build tree
36+
run: rpmdev-setuptree
37+
38+
- name: Generate configure script
39+
run: ./autogen.sh
40+
41+
- name: Configure (generates spec and Makefiles)
42+
run: ./configure
43+
44+
- name: Create source tarball
45+
run: make dist
46+
47+
- name: Get version
48+
id: version
49+
run: |
50+
echo "VERSION=$(grep 'AC_INIT' configure.ac | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')" >> "$GITHUB_OUTPUT"
51+
52+
- name: Copy source tarball to SOURCES
53+
run: |
54+
cp qperf-${{ steps.version.outputs.VERSION }}.tar.gz ~/rpmbuild/SOURCES/
55+
56+
- name: Build RPM
57+
run: |
58+
rpmbuild -ba qperf.spec \
59+
--define "_topdir ${HOME}/rpmbuild" \
60+
--define "_sourcedir ${HOME}/rpmbuild/SOURCES"
61+
62+
- name: Upload binary RPM
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: qperf-el10-rpm
66+
path: ~/rpmbuild/RPMS/**/*.rpm
67+
if-no-files-found: error
68+
69+
- name: Upload source RPM
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: qperf-el10-srpm
73+
path: ~/rpmbuild/SRPMS/**/*.rpm
74+
if-no-files-found: error
75+

0 commit comments

Comments
 (0)