Skip to content

Commit 423aadb

Browse files
author
Pavel Siska
committed
Github-actions: add rpm-build workflow
1 parent 977b5db commit 423aadb

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/rpm-build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: rpm-build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
rpm-build:
12+
runs-on: ubuntu-latest
13+
container: ${{ inputs.os }}
14+
steps:
15+
- name: Install git
16+
run: dnf install -y git
17+
- name: Check out repository code
18+
uses: actions/checkout@v4
19+
- name: Install dependencies
20+
uses: ./.github/actions/install-dependencies
21+
with:
22+
pcap: true
23+
dpdk: true
24+
nfb: true
25+
nemea: true
26+
27+
- name: Mark github workspace as safe
28+
run: git config --system --add safe.directory $PWD
29+
- name: Create build directory
30+
run: mkdir build
31+
- name: Configure CMake to make rpm
32+
run: |
33+
cd build
34+
cmake3 .. -DCMAKE_BUILD_TYPE=Release -DENABLE_INPUT_PCAP=ON -DENABLE_INPUT_DPDK=ON -DENABLE_INPUT_NFB=ON -DENABLE_PROCESS_EXPERIMENTAL=ON -DENABLE_OUTPUT_UNIREC=ON
35+
make rpm
36+
- name: make rpm-msec
37+
run: make rpm-msec
38+
- name: make rpm-nemea
39+
run: make rpm-nemea
40+
- name: extract artifact name
41+
run: |
42+
OS=${{ inputs.os }}
43+
echo "artifactName=$(echo ${OS/:/}-rpm)" >> $GITHUB_ENV
44+
- name: upload RPM artifact
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: ${{ env.artifactName }}
48+
path: ./build/pkg/rpm/rpmbuild/RPMS/x86_64
49+
retention-days: 1

0 commit comments

Comments
 (0)