Skip to content

Commit c1eb4d0

Browse files
authored
Merge pull request #183 from muzarski/fix-pkg-dh-buildsystem
pkg: fix deb package building and extend CI
2 parents acc07fc + 25d5d53 commit c1eb4d0

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

.github/workflows/pkg.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
# Required by `mock`:
19+
### INFO: It seems that you run Mock in a Docker container.
20+
### Mock though uses container tooling itself (namely Podman) for downloading bootstrap image.
21+
### This might require you to run Mock in 'docker run --privileged'.
22+
options: --privileged
23+
# It does not seem to be necessary (CI run without it was successful).
24+
# However, without it, there appear some errors during `mock` execution.
25+
# I've found the solution to these errors here: https://github.com/containers/buildah/issues/3666.
26+
# They are related to podman, which is used by `mock` under the hood.
27+
volumes:
28+
- /var/lib/containers:/var/lib/containers
29+
30+
strategy:
31+
matrix:
32+
dist-version: [rocky-9-x86_64, fedora-40-x86_64]
33+
fail-fast: false
34+
35+
steps:
36+
# See: https://github.com/actions/checkout/issues/363
37+
# An issue related to GH actions containers
38+
- name: Install git and update safe directory
39+
run: |
40+
dnf update -y
41+
dnf install -y git
42+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
43+
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
47+
- name: Build rpm package for ${{ matrix.dist-version }}
48+
run: ./dist/redhat/build_rpm.sh --target ${{ matrix.dist-version }}
49+
50+
build-deb-pkgs:
51+
name: Build deb packages
52+
runs-on: ubuntu-latest
53+
54+
strategy:
55+
matrix:
56+
dist-version: [jammy, noble]
57+
fail-fast: false
58+
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v4
62+
63+
- name: Build deb package for ${{ matrix.dist-version }}
64+
run: ./dist/debian/build_deb.sh --target ${{ matrix.dist-version }}

dist/debian/debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export CARGO_HOME
1414
export RUSTUP_HOME
1515

1616
%:
17-
dh $@
17+
dh $@ --buildsystem=cmake
1818

1919
override_dh_auto_clean:
2020
rm -rf scylla-rust-wrapper/.cargo

0 commit comments

Comments
 (0)