Skip to content

Bugfix + features for lessening forwarding load #257

Bugfix + features for lessening forwarding load

Bugfix + features for lessening forwarding load #257

Workflow file for this run

name: systemd-netlogd CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build-ubuntu:
name: Build and Test on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update package index
run: sudo apt-get update
- name: Install build dependencies
run: |
sudo apt-get install -y \
python3-sphinx \
ninja-build \
meson \
libsystemd-dev \
clang \
gperf \
libcap-dev \
build-essential \
libcmocka-dev \
libssl-dev
- name: Build project
run: |
meson setup build
meson compile -C build
- name: Run tests
run: meson test -C build -v
- name: Install
run: sudo meson install -C build
- name: Create systemd-journal-netlog user
run: sudo useradd -r -d / -s /usr/sbin/nologin -g systemd-journal systemd-journal-netlog || true
- name: Start systemd-netlogd
run: |
sudo systemctl daemon-reload
sudo systemctl start systemd-netlogd
- name: Show service status
run: sudo systemctl status systemd-netlogd
build-rpm:
name: Build RPM (${{ matrix.os }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- os: fedora:latest
artifact: fedora-latest
- os: fedora:41
artifact: fedora-41
container:
image: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install RPM build dependencies
run: |
dnf install -y \
rpm-build \
rpmdevtools \
meson \
ninja-build \
gcc \
systemd-devel \
libcap-devel \
gperf \
openssl-devel \
libcmocka-devel \
python3-sphinx \
python3-devel \
python3-lxml
- name: Set up RPM build tree
run: rpmdev-setuptree || mkdir -p $HOME/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
- name: Create source tarball
run: |
VERSION=$(grep -oP "version\s*:\s*'\K[^']+" meson.build | head -1)
echo "Building version $VERSION"
mkdir -p /tmp/systemd-netlogd-$VERSION
cp -a $(ls -A | grep -v '^\.\(git\)$' | grep -v '^builddir$') /tmp/systemd-netlogd-$VERSION/
tar czf $HOME/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz -C /tmp systemd-netlogd-$VERSION
ls -lh $HOME/rpmbuild/SOURCES/
- name: Copy spec file
run: cp systemd-netlogd.spec $HOME/rpmbuild/SPECS/
- name: Build RPMs
run: rpmbuild -ba $HOME/rpmbuild/SPECS/systemd-netlogd.spec
- name: Test install RPM
run: |
rpm -ivh --nodeps $HOME/rpmbuild/RPMS/*/systemd-netlogd-*.rpm
rpm -qi systemd-netlogd
- name: Upload RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpms-${{ matrix.artifact }}
path: /github/home/rpmbuild/RPMS/
retention-days: 30
build-rpm-rocky:
name: Build RPM (rockylinux:9)
runs-on: ubuntu-latest
container:
image: rockylinux:9
steps:
- uses: actions/checkout@v4
- name: Enable CRB and install EPEL
run: |
dnf install -y epel-release
/usr/bin/crb enable
- name: Install RPM build dependencies
run: |
dnf install -y \
rpm-build \
rpmdevtools \
gcc \
systemd-devel \
libcap-devel \
gperf \
openssl-devel \
libcmocka-devel \
python3-pip \
python3-sphinx \
python3-devel \
python3-lxml
pip3 install --prefix=/usr meson ninja
- name: Set up RPM build tree
run: rpmdev-setuptree || mkdir -p $HOME/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
- name: Create source tarball
run: |
VERSION=$(grep -oP "version\s*:\s*'\K[^']+" meson.build | head -1)
echo "Building version $VERSION"
mkdir -p /tmp/systemd-netlogd-$VERSION
cp -a $(ls -A | grep -v '^\.\(git\)$' | grep -v '^builddir$') /tmp/systemd-netlogd-$VERSION/
tar czf $HOME/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz -C /tmp systemd-netlogd-$VERSION
ls -lh $HOME/rpmbuild/SOURCES/
- name: Copy spec file
run: cp systemd-netlogd.spec $HOME/rpmbuild/SPECS/
- name: Build RPMs
run: rpmbuild -ba --nodeps $HOME/rpmbuild/SPECS/systemd-netlogd.spec
- name: Test install RPM
run: |
rpm -ivh --nodeps $HOME/rpmbuild/RPMS/*/systemd-netlogd-*.rpm
rpm -qi systemd-netlogd
- name: Upload RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpms-rockylinux-9
path: /github/home/rpmbuild/RPMS/
retention-days: 30
build-deb:
name: Build DEB (${{ matrix.os }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu:24.04
artifact: ubuntu-24.04
- os: ubuntu:22.04
artifact: ubuntu-22.04
- os: debian:12
artifact: debian-12
container:
image: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get install -y \
build-essential \
debhelper \
meson \
ninja-build \
pkg-config \
libsystemd-dev \
libcap-dev \
gperf \
libssl-dev \
libcmocka-dev \
python3-sphinx \
fakeroot \
devscripts
- name: Build DEB package
run: dpkg-buildpackage -us -uc -b
- name: Collect DEB packages
run: |
mkdir -p debs
cp ../*.deb debs/ || true
ls -lh debs/
- name: Test install DEB
run: |
dpkg -i debs/systemd-netlogd_*.deb || apt-get install -f -y
dpkg -s systemd-netlogd
systemctl status systemd-netlogd || true
- name: Upload DEB artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: debs-${{ matrix.artifact }}
path: debs/
retention-days: 30
build-archlinux:
name: Build on Arch Linux
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Install base-devel and dependencies
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm \
base-devel \
meson \
gperf \
libcap \
openssl \
systemd-libs \
python-sphinx \
cmocka \
git
- uses: actions/checkout@v4
- name: Build
run: |
meson setup build \
--prefix=/usr/lib/systemd \
--sysconfdir=/etc/systemd
meson compile -C build
- name: Run tests
run: meson test -C build -v
- name: Install
run: meson install -C build --destdir "$PWD/pkg"