Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/rpm-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: RPM Build
on:
pull_request:
branches:
- '**'
- '!mainline'

jobs:
rpm-build-job:
strategy:
matrix:
include:
- arch: x86_64
runner: kernel-build
mock_config: rocky-9-x86_64
- arch: aarch64
runner: kernel-build-arm64
mock_config: rocky-9-aarch64
runs-on:
labels: ${{ matrix.runner }}
container:
image: rockylinux/rockylinux:9
options: --privileged --cpus 8
steps:
- name: Install tools and libraries
run: |
dnf install -y epel-release
dnf install -y mock git rust cargo zstd which
useradd -m -G mock mockbuild

- name: Checkout code
uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.head.sha }}"
fetch-depth: 0
fetch-tags: true

- name: Generate tarball
run: |
git config --global --add safe.directory /__w/kernel-src-tree/kernel-src-tree
./ciq/SOURCES/generate_tarball.sh

- name: Bundle bindgen
run: ./ciq/SOURCES/bundle_bindgen.sh ./ciq/SOURCES

- name: Build SRPM
run: |
mkdir -p ../build_files
chown mockbuild:mock ../build_files
su mockbuild -c "mock -v -r ${{ matrix.mock_config }} --resultdir=$(pwd)/../build_files \
--buildsrpm \
--sources=$(pwd)/ciq/SOURCES \
--spec=$(pwd)/ciq/SPECS/kernel-clk6.18.spec"

- name: Build RPM
run: |
SRPM=$(ls ../build_files/*.src.rpm | head -1)
su mockbuild -c "mock -v -r ${{ matrix.mock_config }} --resultdir=$(pwd)/../build_files $SRPM"
Loading