fix latest.spec #26
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
on: [push, pull_request] | |
name: FDSPP | |
jobs: | |
build-rpm: | |
name: Build RPM Fedora | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
container: | |
- "rockylinux:9" | |
- "fedora:40" | |
container: ${{ matrix.container }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: General update | |
run: dnf update -y --refresh | |
- name: Install basic build prerequisites | |
run: dnf install -y git gcc g++ rpmdevtools make | |
- name: Enable EPEL | |
if: matrix.container == 'rockylinux:9' | |
run: | | |
dnf install -y 'dnf-command(config-manager)' | |
dnf config-manager --set-enabled crb | |
dnf install -y epel-release | |
- name: Install rpmautospec-rpm-macros | |
if: matrix.container == 'rockylinux:9' | |
run: dnf install -y rpmautospec-rpm-macros | |
- name: Install lib prerequisites | |
run: dnf install -y rust cargo cargo-rpm-macros rust-clap+cargo-devel | |
rust-serde+derive-devel rust-serde_json+default-devel | |
rust-tempfile+default-devel rust-serde+default-devel | |
rust-clap+default-devel rust-utf-8+default-devel | |
- name: Build namelist RPMs | |
run: | | |
cd rust-namelist | |
# TODO: This is an odd workaroud for a missing file | |
touch /usr/share/cargo/registry/clap_builder-4.5.23/README.md | |
ls /usr/share/cargo/registry/clap_builder-4.5.23 | |
bash ./buildrpm.sh | |
dnf install -y rpmbuild/RPMS/noarch/rust-namelist*.rpm | |
- name: Build RPM | |
run: | | |
cd fdspp | |
bash ./buildrpm.sh | |
ls ../dist/*.rpm | |
- id: setContainerSafeName | |
run: | | |
export test_version=$(echo ${{ matrix.container }} | sed 's/:/\-/g') | |
echo "containerSafe=$test_version" >> $GITHUB_OUTPUT | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: fdspp-RPMs-${{ steps.setContainerSafeName.outputs.containerSafe }} | |
path: | | |
dist/*.rpm | |
merge: | |
runs-on: ubuntu-latest | |
needs: build-rpm | |
steps: | |
- name: Merge Artifacts | |
uses: actions/upload-artifact/merge@v4 | |
with: | |
name: fdspp-RPMs | |
pattern: fdspp-RPMs-* |