Skip to content

Commit 3da7fcc

Browse files
committed
github actions: add RPM build workflow for x86_64 and aarch64
1 parent 1b332ff commit 3da7fcc

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/rpm-build.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: RPM Build
2+
on:
3+
pull_request:
4+
branches:
5+
- '**'
6+
- '!mainline'
7+
8+
jobs:
9+
rpm-build-job:
10+
strategy:
11+
matrix:
12+
include:
13+
- arch: x86_64
14+
runner: kernel-build
15+
mock_config: rocky-9-x86_64
16+
- arch: aarch64
17+
runner: kernel-build-arm64
18+
mock_config: rocky-9-aarch64
19+
runs-on:
20+
labels: ${{ matrix.runner }}
21+
container:
22+
image: rockylinux/rockylinux:9
23+
options: --privileged --cpus 8
24+
steps:
25+
- name: Install tools and libraries
26+
run: |
27+
dnf install -y epel-release
28+
dnf install -y mock git rust cargo zstd which
29+
useradd -m -G mock mockbuild
30+
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
with:
34+
ref: "${{ github.event.pull_request.head.sha }}"
35+
fetch-depth: 0
36+
fetch-tags: true
37+
38+
- name: Generate tarball
39+
run: |
40+
git config --global --add safe.directory /__w/kernel-src-tree/kernel-src-tree
41+
./ciq/SOURCES/generate_tarball.sh
42+
43+
- name: Bundle bindgen
44+
run: ./ciq/SOURCES/bundle_bindgen.sh ./ciq/SOURCES
45+
46+
- name: Build SRPM
47+
run: |
48+
mkdir -p ../build_files
49+
chown mockbuild:mock ../build_files
50+
su mockbuild -c "mock -v -r ${{ matrix.mock_config }} --resultdir=$(pwd)/../build_files \
51+
--buildsrpm \
52+
--sources=$(pwd)/ciq/SOURCES \
53+
--spec=$(pwd)/ciq/SPECS/kernel-clk6.18.spec"
54+
55+
- name: Build RPM
56+
run: |
57+
SRPM=$(ls ../build_files/*.src.rpm | head -1)
58+
su mockbuild -c "mock -v -r ${{ matrix.mock_config }} --resultdir=$(pwd)/../build_files $SRPM"

0 commit comments

Comments
 (0)