Skip to content

Commit 8f20ecf

Browse files
committed
Test and publish an AlmaLinux RPM
Signed-off-by: George Holderness <george.holderness@alianza.com>
1 parent b6fd159 commit 8f20ecf

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,51 @@ jobs:
6767
floki*.zip
6868
floki*.tar.gz
6969
70+
71+
rpm:
72+
name: Build and test RPM using cargo generate-rpm
73+
runs-on: ubuntu-24.04
74+
container:
75+
image: almalinux:9
76+
needs: build
77+
steps:
78+
- uses: actions/checkout@v5
79+
- name: Install rust
80+
uses: dtolnay/rust-toolchain@master
81+
with:
82+
toolchain: stable
83+
- name: Install cargo-generate-rpm
84+
run: dnf install gcc && cargo install cargo-generate-rpm
85+
# Download ubuntu artifact instead of rebuilding in alma.
86+
# This is OK because it's statically linked.
87+
- name: Download artifacts
88+
uses: actions/download-artifact@v4
89+
with:
90+
name: stableartifacts-ubuntu-24.04
91+
- name: Build RPM
92+
run: |
93+
tar -xzvf floki*.tar.gz
94+
mkdir -p target/release
95+
cp floki target/release/floki
96+
cargo generate-rpm -s 'release = "1.el9"'
97+
- name: Install RPM
98+
run: find floki*rpm | xargs dnf install -y floki*.rpm
99+
- name: Test installation
100+
run: floki -V
101+
- name: Archive artifacts
102+
uses: actions/upload-artifact@v4
103+
with:
104+
name: rpm
105+
path: |
106+
target/release/floki*.rpm
107+
70108
publish:
71109
name: Publish release artifact
72110
runs-on: ubuntu-latest
73111
if: github.ref_type == 'tag'
74112
needs:
75113
- build
114+
- rpm
76115
# Required to publish a release
77116
permissions:
78117
contents: write
@@ -97,6 +136,10 @@ jobs:
97136
uses: actions/download-artifact@v5
98137
with:
99138
name: stableartifacts-macos-latest
139+
- name: Download RPM
140+
uses: actions/download-artifact@v5
141+
with:
142+
name: rpm
100143
- name: Generate release.txt
101144
run: "./changelog.sh"
102145
- name: Release
@@ -106,6 +149,7 @@ jobs:
106149
files: |
107150
floki*.zip
108151
floki*.tar.gz
152+
floki*.rpm
109153
# # Announce the release
110154
# - run: "./announce.sh"
111155
# env:
@@ -117,6 +161,7 @@ jobs:
117161
if: github.ref_type != 'tag'
118162
needs:
119163
- build
164+
- rpm
120165
steps:
121166
- uses: actions/checkout@v5
122167
- name: Install rust
@@ -136,6 +181,10 @@ jobs:
136181
uses: actions/download-artifact@v5
137182
with:
138183
name: stableartifacts-macos-latest
184+
- name: Download rpm
185+
uses: actions/download-artifact@v5
186+
with:
187+
name: rpm
139188
# Test generating release.txt
140189
- name: Generate release.txt
141190
run: "./changelog.sh"

0 commit comments

Comments
 (0)