-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (71 loc) · 2.61 KB
/
build-client-deb.yml
File metadata and controls
80 lines (71 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build Bareos Client DEB
on:
push:
branches:
- main
jobs:
build-deb:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- distro: bookworm
image: debian:bookworm
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential cmake git \
libssl-dev zlib1g-dev libacl1-dev liblzo2-dev \
libjansson-dev bison flex \
libreadline-dev pkg-config fakeroot
- name: Clone Bareos
run: |
git clone https://github.com/bareos/bareos.git bareos-repo
- name: checkout release
working-directory: ./bareos-repo
run: |
git fetch --all
git checkout Release/24.0.4 # ex: Release/24.0.4
echo install\(FILES "${CMAKE_BINARY_DIR}/debian/bareos-filedaemon.service" DESTINATION lib/systemd/system\) >>CMakeLists.txt
mkdir ./build
ls
- name: Extract version from tag
id: vars
run: echo "VERSION=${GITHUB_REF_NAME#Release/}" >> $GITHUB_ENV
- name: check work space
run: ls -lisa $GITHUB_WORKSPACE/bareos-repo/build
- name: Build Bareos Client
working-directory: ./bareos-repo
run: |
echo "=== Current dir ==="
pwd
echo "=== Listing ==="
ls -la
echo "=== cmake ==="
cmake -S . -B build -Dclient-only=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCPACK_PACKAGE_CONTACT="Libertech <contact@libertech.fr>" \
-DCPACK_PACKAGE_VERSION=24.0.4 \
-DCPACK_DEBIAN_PACKAGE_MAINTAINER="Libertech <contact@libertech.fr>" \
-DCPACK_DEBIAN_PACKAGE_DEPENDS="libssl3, zlib1g, libacl1, liblzo2-2, libjansson4, libreadline8" \
-DCPACK_DEBIAN_PACKAGE_CONTROL_EXTRA="debian/preinst;debian/postinst" ..
# Copier scripts Debian
cp ./debian/bareos-filedaemon.preinst ./debian/preinst
cp ./debian/bareos-filedaemon.postinst ./debian/postinst
chmod +x ./debian/preinst ./debian/postinst
make -j$(nproc)
cpack -G DEB
- name: Upload DEB as artifact
uses: actions/upload-artifact@v4
with:
name: bareos-client-deb-{{ matrix.distro }}
path: bareos-repo/build/*.deb
- name: Attach DEB to GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: bareos-repo/build/*.deb