Skip to content

Commit

Permalink
Fix install test
Browse files Browse the repository at this point in the history
  • Loading branch information
bynect committed Jan 24, 2025
1 parent bda7e86 commit a234921
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 25 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ jobs:
CC: gcc
EXTRA_CFLAGS: "-Werror"
MAKE: gmake
INSTALL: ginstall
FIND: gfind
SED: gsed
AWK: gawk

steps:
- uses: actions/checkout@v4
Expand All @@ -83,18 +87,22 @@ jobs:
- name: Test in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
envs: "CC EXTRA_CFLAGS MAKE"
envs: "CC EXTRA_CFLAGS MAKE INSTALL FIND SED AWK"
usesh: true
sync: rsync
copyback: false

prepare: |
pkg install -y x11-toolkits/pango devel/glib20 graphics/gdk-pixbuf2 graphics/cairo graphics/wayland \
devel/libnotify devel/dbus x11/libXScrnSaver x11/libXrandr x11/libXext x11/libX11 lang/perl5.36 \
devel/pkgconf devel/gmake devel/evdev-proto valgrind x11/libXinerama graphics/wayland-protocols \
devel/gettext-runtime x11-fonts/fontconfig x11-fonts/dejavu lang/gcc git librsvg2 bash
devel/pkgconf devel/evdev-proto valgrind x11/libXinerama graphics/wayland-protocols \
devel/gettext-runtime x11-fonts/dejavu lang/gcc git librsvg2 bash findutils coreutils gmake
run: |
echo "* Info"
ls -la
git describe --tags
echo "* Run test suite"
gmake -j test
Expand Down
2 changes: 0 additions & 2 deletions .valgrind.suppressions
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@
# FreeBSD part1
glib_leak_freebsd1
Memchek:Leak
fun:*alloc
...
fun:g_dbus_address_get_stream_sync
...
Expand All @@ -229,7 +228,6 @@
# XXX: Why isn't memory freed in g_bus_unown_name?
glib_leak_freebsd2
Memchek:Leak
fun:*alloc
...
fun:g_bus_own_name
...
Expand Down
36 changes: 18 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ endif
test: test/test clean-coverage-run
# Make sure an error code is returned when the test fails
/usr/bin/env bash -c 'set -euo pipefail;\
TESTDIR=./test ./test/test -v | ./test/greenest.awk '
TESTDIR=./test ./test/test -v | ${AWK} -f ./test/greenest.awk '

test-valgrind: test/test
TESTDIR=./test ${VALGRIND} \
Expand Down Expand Up @@ -223,49 +223,49 @@ clean-wayland-protocols:
install: install-dunst install-dunstctl install-dunstrc install-service

install-dunst: dunst doc
install -Dm755 dunst ${DESTDIR}${BINDIR}/dunst
install -Dm644 docs/dunst.1 ${DESTDIR}${MANPREFIX}/man1/dunst.1
install -Dm644 docs/dunst.5 ${DESTDIR}${MANPREFIX}/man5/dunst.5
install -Dm644 docs/dunstctl.1 ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
install -Dm644 docs/dunstify.1 ${DESTDIR}${MANPREFIX}/man1/dunstify.1
${INSTALL} -Dm755 dunst ${DESTDIR}${BINDIR}/dunst
${INSTALL} -Dm644 docs/dunst.1 ${DESTDIR}${MANPREFIX}/man1/dunst.1
${INSTALL} -Dm644 docs/dunst.5 ${DESTDIR}${MANPREFIX}/man5/dunst.5
${INSTALL} -Dm644 docs/dunstctl.1 ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
${INSTALL} -Dm644 docs/dunstify.1 ${DESTDIR}${MANPREFIX}/man1/dunstify.1

install-dunstctl: dunstctl
install -Dm755 dunstctl ${DESTDIR}${BINDIR}/dunstctl
${INSTALL} -Dm755 dunstctl ${DESTDIR}${BINDIR}/dunstctl

ifeq (1,${SYSCONF_FORCE_NEW})
install-dunstrc:
install -Dm644 dunstrc ${DESTDIR}${SYSCONFFILE}
${INSTALL} -Dm644 dunstrc ${DESTDIR}${SYSCONFFILE}
endif

install-service: install-service-dbus
install-service-dbus: service-dbus
install -Dm644 org.knopwob.dunst.service ${DESTDIR}${SERVICEDIR_DBUS}/org.knopwob.dunst.service
${INSTALL} -Dm644 org.knopwob.dunst.service ${DESTDIR}${SERVICEDIR_DBUS}/org.knopwob.dunst.service
ifneq (0,${SYSTEMD})
install-service: install-service-systemd
install-service-systemd: service-systemd
install -Dm644 dunst.systemd.service ${DESTDIR}${SERVICEDIR_SYSTEMD}/dunst.service
${INSTALL} -Dm644 dunst.systemd.service ${DESTDIR}${SERVICEDIR_SYSTEMD}/dunst.service
endif

ifneq (0,${DUNSTIFY})
install: install-dunstify
install-dunstify: dunstify
install -Dm755 dunstify ${DESTDIR}${BINDIR}/dunstify
${INSTALL} -Dm755 dunstify ${DESTDIR}${BINDIR}/dunstify
endif

ifneq (0,${COMPLETIONS})
install: install-completions
install-completions:
install -Dm644 completions/dunst.bashcomp ${DESTDIR}${BASHCOMPLETIONDIR}/dunst
install -Dm644 completions/dunstctl.bashcomp ${DESTDIR}${BASHCOMPLETIONDIR}/dunstctl
install -Dm644 completions/_dunst.zshcomp ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunst
install -Dm644 completions/_dunstctl.zshcomp ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunstctl
install -Dm644 completions/dunst.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunst.fish
install -Dm644 completions/dunstctl.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstctl.fish
${INSTALL} -Dm644 completions/dunst.bashcomp ${DESTDIR}${BASHCOMPLETIONDIR}/dunst
${INSTALL} -Dm644 completions/dunstctl.bashcomp ${DESTDIR}${BASHCOMPLETIONDIR}/dunstctl
${INSTALL} -Dm644 completions/_dunst.zshcomp ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunst
${INSTALL} -Dm644 completions/_dunstctl.zshcomp ${DESTDIR}${ZSHCOMPLETIONDIR}/_dunstctl
${INSTALL} -Dm644 completions/dunst.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunst.fish
${INSTALL} -Dm644 completions/dunstctl.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstctl.fish

ifneq (0,${DUNSTIFY})
install: install-completions-dunstify
install-completions-dunstify:
install -Dm644 completions/dunstify.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstify.fish
${INSTALL} -Dm644 completions/dunstify.fishcomp ${DESTDIR}${FISHCOMPLETIONDIR}/dunstify.fish
endif
endif

Expand Down
10 changes: 8 additions & 2 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@ SERVICEDIR_SYSTEMD ?= ${PREFIX}/lib/systemd/user
EXTRA_CFLAGS ?=

DOXYGEN ?= doxygen
FIND ?= find
GCOVR ?= gcovr
GIT ?= git
PKG_CONFIG ?= pkg-config
POD2MAN ?= pod2man
SED ?= sed
SYSTEMDAEMON ?= systemd
VALGRIND ?= valgrind

# Provided for compatibility with BSDs
# You will need to prepend g's to these programs
INSTALL ?= install
MAKE ?= make
FIND ?= find
SED ?= sed
AWK ?= awk

# Disable systemd service file installation,
# if you don't want to use systemd albeit installed
#SYSTEMD ?= 0
Expand Down

0 comments on commit a234921

Please sign in to comment.