From 3da7fcc91f1c3cbf029a742daa37c831a285529f Mon Sep 17 00:00:00 2001 From: Brett Mastbergen Date: Wed, 8 Apr 2026 09:40:06 -0400 Subject: [PATCH] github actions: add RPM build workflow for x86_64 and aarch64 --- .github/workflows/rpm-build.yml | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/rpm-build.yml diff --git a/.github/workflows/rpm-build.yml b/.github/workflows/rpm-build.yml new file mode 100644 index 0000000000000..75bae29f14166 --- /dev/null +++ b/.github/workflows/rpm-build.yml @@ -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"