Skip to content

Commit

Permalink
Merge branch 'main' into debian
Browse files Browse the repository at this point in the history
  • Loading branch information
dallmair committed Dec 28, 2024
2 parents 3467e0a + 720a5a0 commit 455a67c
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 3 deletions.
106 changes: 106 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: CI

on:
push:
branches: "*"
pull_request:
branches: "*"

permissions: {}

jobs:
# On Ubuntu, because that is the standard OS of GitHub Actions.
build_ubuntu:

runs-on: ubuntu-latest

steps:
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libsystemd-dev libev-dev libfmt-dev libinih-dev

- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history to be able to determine version number

- name: Bootstrap
run: sh bootstrap.sh

- name: Configure
run: ./configure

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

- name: Install
run: sudo make -j1 install

# On Alpine, because it's a tiny distro heavily used in containers.
build_alpine:

runs-on: ubuntu-latest
container: alpine

steps:
- name: Install build dependencies
run: apk update && apk add git build-base autoconf automake libtool argp-standalone linux-headers libusb-dev libev-dev fmt-dev inih-dev

- name: Configure git in container
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history to be able to determine version number

- name: Bootstrap
run: sh bootstrap.sh

- name: Configure
run: ./configure --disable-systemd

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

- name: Install
run: make -j1 install

# Debian packaging; May break when code changes require updates to the Debian package.
# Merges the pushed/proposed code changes to the `debian` branch and builds that then.
package_debian:

strategy:
fail-fast: false
matrix:
release: [testing, stable, oldstable]
runs-on: ubuntu-latest
container: debian:${{ matrix.release }}-slim

# When systemd is installed, these values are set in /usr/share/pkgconfig/systemd.pc.
# It does not make sense to install the full systemd in a build container, though, so
# inject the relevant values for successful "make install" with environment variables.
env:
SYSTEMD_DIR: /lib/systemd/system
SYSTEMD_SYSUSERS_DIR: /usr/lib/sysusers.d

steps:
- name: Install dependencies
run: |
apt-get update
apt-get upgrade -y
apt-get install -y --no-install-recommends ca-certificates git sudo
- name: Configure git in container
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history to be able to determine version number

- name: Merge into debian branch
run: git checkout debian && git merge "$GITHUB_REF"

- name: Build and install
run: sh install-debian.sh
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ dnl ## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
dnl ## SUCH DAMAGE.


AC_PREREQ([2.72])
AC_PREREQ([2.69])
LT_PREREQ([2.2.0])

AC_INIT([knxd],m4_esyscmd(sh -c "./tools/version.sh | tr -d '\n'"))
AC_INIT([knxd],m4_esyscmd_s([./tools/version.sh]))
AC_CONFIG_SRCDIR([src/server/knxd.cpp])
AM_INIT_AUTOMAKE
LT_INIT
Expand Down
2 changes: 1 addition & 1 deletion src/usb/usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <cstdlib>
#include <cerrno>
#include <sys/poll.h>
#include <poll.h>
#include "usb.h"
#include "types.h"

Expand Down

0 comments on commit 455a67c

Please sign in to comment.