Skip to content

Commit 1fd54cf

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 1fd54cf

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/pkg.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
container:
17+
image: fedora:latest
18+
options: --privileged
19+
volumes:
20+
- /var/lib/containers:/var/lib/containers
21+
22+
strategy:
23+
matrix:
24+
dist-version: [rocky-9-x86_64, fedora-40-x86_64]
25+
fail-fast: false
26+
27+
steps:
28+
# See: https://github.com/actions/checkout/issues/363
29+
# An issue related to GH actions containers
30+
- name: Install git and update safe directory
31+
run: |
32+
dnf update -y
33+
dnf install -y git
34+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
35+
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- name: Build rpm package for ${{ matrix.dist-version }}
40+
run: ./dist/redhat/build_rpm.sh --target ${{ matrix.dist-version }}
41+
42+
build-deb-pkgs:
43+
name: Build deb packages
44+
runs-on: ubuntu-latest
45+
46+
strategy:
47+
matrix:
48+
dist-version: [jammy, noble]
49+
fail-fast: false
50+
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
55+
- name: Build deb package for ${{ matrix.dist-version }}
56+
run: ./dist/debian/build_deb.sh --target ${{ matrix.dist-version }}

0 commit comments

Comments
 (0)