Re-enable devel installations. #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release RPMs | |
on: | |
push: | |
tags: | |
- 'v*' | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
full_build: | |
description: 'Run full build and tests' | |
required: false | |
default: false | |
type: boolean | |
jobs: | |
build-rpms: | |
runs-on: ubuntu-latest | |
container: | |
image: rockylinux/rockylinux:9.4 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Quick spec validation | |
if: github.event_name == 'pull_request' | |
run: | | |
dnf -y install rpm rpmlint | |
rpmlint *.spec | |
- name: Full RPM Build | |
if: | | |
startsWith(github.ref, 'refs/tags/') || | |
(github.event_name == 'workflow_dispatch' && inputs.full_build) || | |
github.ref == 'refs/heads/main' | |
run: | | |
dnf -y update | |
dnf -y --enablerepo=devel install gcc-fortran make cmake automake gcc-c++ \ | |
libstdc++-devel rpm-build rpmdevtools epel-release \ | |
libev-devel gsl-devel libjpeg-turbo-devel fftw-devel \ | |
cfitsio-devel zlib-devel libusbx-devel curl-devel | |
dnf -y install https://www.rpmfind.net/linux/fedora/linux/releases/39/Everything/x86_64/os/Packages/l/libnova-0.15.0-22.fc39.x86_64.rpm | |
dnf -y install https://www.rpmfind.net/linux/fedora/linux/releases/39/Everything/x86_64/os/Packages/l/libnova-devel-0.15.0-22.fc39.x86_64.rpm | |
rpmdev-setuptree | |
cp *.spec /github/home/rpmbuild/SPECS/ | |
for spec in /github/home/rpmbuild/SPECS/*.spec; do | |
spectool -g -R "$spec" | |
rpmbuild -ba "$spec" | |
done | |
# Debug: List all built RPMs | |
echo "Built RPMs:" | |
find /github/home/rpmbuild -name "*.rpm" -ls | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
/github/home/rpmbuild/RPMS/*/*.rpm | |
/github/home/rpmbuild/SRPMS/*.rpm | |
fail_on_unmatched_files: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload RPMs as artifacts | |
if: | | |
startsWith(github.ref, 'refs/tags/') || | |
(github.event_name == 'workflow_dispatch' && inputs.full_build) || | |
github.ref == 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpms | |
path: | | |
/github/home/rpmbuild/RPMS/*/*.rpm | |
/github/home/rpmbuild/SRPMS/*.rpm | |
retention-days: 5 |