Skip to content
Merged
Show file tree
Hide file tree
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
44 changes: 44 additions & 0 deletions .github/actions/build-rpm-and-srpm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Build RPM and SRPM
description: Build RPM and SRPM packages for EL8, EL9, and EL10 using GitHub Actions.
inputs:
alma_version:
description: 'The version of AlmaLinux to build for (e.g., 8, 9, or 10).'
required: true
default: '8'
runs:
using: 'composite'
steps:

- name: Install config-manager dnf plugin
run: |
dnf install -y 'dnf-command(config-manager)'
shell: bash

- name: On EL8, enable PowerTools repository
if: matrix.alma_version == '8'
run: |
dnf config-manager --set-enabled powertools
shell: bash

- name: On newer EL versions, enable CRB repository
if: matrix.alma_version != '8'
run: |
dnf config-manager --set-enabled crb
shell: bash

- name: Enable EPEL repository
run: |
dnf install -y epel-release
shell: bash

- name: Install dependencies
run: |
dnf install -y hdf5-devel libzstd-devel gcc make rpmdevtools
shell: bash

- name: Build srpm and rpm
run: |
make srpm
make rpm
shell: bash
34 changes: 5 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,10 @@ jobs:
options: --user root
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install config-manager dnf plugin
run: |
dnf install -y 'dnf-command(config-manager)'
- name: Build RPM and SRPM
uses: ./.github/actions/build-rpm-and-srpm
with:
alma_version: ${{ matrix.alma_version }}

- name: On EL8, enable PowerTools repository
if: matrix.alma_version == '8'
run: |
dnf config-manager --set-enabled powertools

- name: On newer EL versions, enable CRB repository
if: matrix.alma_version != '8'
run: |
dnf config-manager --set-enabled crb

- name: Enable EPEL repository
run: |
dnf install -y epel-release

- name: Install dependencies
run: |
dnf install -y hdf5-devel libzstd-devel gcc make rpmdevtools

- name: Build srpm
run: |
make srpm

- name: Build rpm
run: |
make rpm
40 changes: 5 additions & 35 deletions .github/workflows/publish-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,14 @@ jobs:
alma_version: [8, 9, 10]
container:
image: almalinux:${{ matrix.alma_version }}
options: --user root
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install config-manager dnf plugin
run: |
dnf install -y 'dnf-command(config-manager)'

- name: On EL8, enable PowerTools repository
if: matrix.alma_version == '8'
run: |
dnf config-manager --set-enabled powertools

- name: On newer EL versions, enable CRB repository
if: matrix.alma_version != '8'
run: |
dnf config-manager --set-enabled crb

- name: Enable EPEL repository
run: |
dnf install -y epel-release

- name: Add GitHub CLI repository
run: |
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo

- name: Install dependencies
run: |
dnf install -y hdf5-devel libzstd-devel gcc make rpmdevtools gh

- name: Build srpm
run: |
make srpm

- name: Build rpm
run: |
make rpm
- name: Build RPM and SRPM
uses: ./.github/actions/build-rpm-and-srpm
with:
alma_version: ${{ matrix.alma_version }}

- name: Upload rpms to release
run: |
Expand Down