Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/build-podman.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build ARM64 with Podman

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
build:
name: Cross-compile to ARM64
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Set up Podman
run: |
sudo apt-get update
sudo apt-get install -y podman

- name: Set version
id: version
run: echo "VERSION=$(cat version)" >> $GITHUB_OUTPUT

- name: Build ARM64 in container
run: |
podman run --rm -v $PWD:/workspace --platform linux/arm64 \
ubuntu:24.04 bash -c "
cd /workspace && \
apt-get update && \
apt-get install -y build-essential cmake pkg-config git libssl-dev libsystemd-dev && \
cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel -DGGL_LOG_LEVEL=INFO && \
make -C build -j\$(nproc) && \
strip build/bin/system-log-forwarder
"

- name: Save package
run: |
mkdir -p ${{ github.workspace }}/zipfile/
cp build/bin/system-log-forwarder ${{ github.workspace }}/zipfile/

- name: md5sums
run: |
md5sum ${{ github.workspace }}/zipfile/*

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: system-log-forwarder-arm64-${{ steps.version.outputs.VERSION }}
path: |
${{ github.workspace }}/zipfile/*
retention-days: 1
62 changes: 62 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and Package SystemLogForwarder

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
build:
name: Build ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-latest
# - arch: arm64
# runner: ubuntu-24.04-arm

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake pkg-config git libssl-dev libsystemd-dev

- name: Set version
id: version
run: echo "VERSION=$(cat version)" >> $GITHUB_OUTPUT

- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel -DGGL_LOG_LEVEL=INFO

- name: Build
run: make -C build -j$(nproc)

- name: Strip binary
run: strip build/bin/system-log-forwarder

- name: Save package
run: |
mkdir -p ${{ github.workspace }}/zipfile/
cp build/bin/system-log-forwarder ${{ github.workspace }}/zipfile/

- name: md5sums
run: |
md5sum ${{ github.workspace }}/zipfile/*

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name:
system-log-forwarder-${{ matrix.arch }}-${{
steps.version.outputs.VERSION }}
path: |
${{ github.workspace }}/zipfile/*
retention-days: 1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To build the project, you will need the following build dependencies:
On Ubuntu, these can be installed with:

```sh
sudo apt update && sudo apt install build-essential pkg-config cmake git libssl-dev
sudo apt update && sudo apt install build-essential pkg-config cmake git libssl-dev libsystemd-dev
```

To make a release build configured for minimal size, run:
Expand Down