Skip to content

Commit 53884b7

Browse files
committed
ci: add workflow for building packages
Since changes such as introducing a top-level Makefile can cause a failure during building packages, we will extend our CI to test that we can successfully build packages after introducing some changes in the future.
1 parent 2a0efbf commit 53884b7

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/pkg.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build packages
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLORS: always
11+
12+
jobs:
13+
build-rpm-pkgs:
14+
name: Build rpm packages
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
dist-version: [rocky-9-x86_64, fedora-40-x86_64]
20+
fail-fast: false
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Update git safe directory config
27+
run: git config --global --add safe.directory $(pwd)
28+
29+
- name: Build rpm package for ${{ matrix.dist-version }}
30+
run: docker run -v $(pwd):$(pwd) -w $(pwd) -t fedora:latest sudo dnf install git && git config --global --add safe.directory $(pwd) && ./dist/redhat/build_rpm.sh --target ${{ matrix.dist-version }}
31+
32+
build-deb-pkgs:
33+
name: Build deb packages
34+
runs-on: ubuntu-latest
35+
36+
strategy:
37+
matrix:
38+
dist-version: [jammy, noble]
39+
fail-fast: false
40+
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Build deb package for ${{ matrix.dist-version }}
46+
run: ./dist/debian/build_deb.sh --target ${{ matrix.dist-version }}

0 commit comments

Comments
 (0)