Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some more fixes & improvements #2023

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
linux:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.arch
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN pacman -Syu --noconfirm && pacman -S --needed --noconfirm \
cmake \
cmocka \
curl \
debuginfod \
doxygen \
expat \
gcc \
Expand All @@ -28,6 +29,7 @@ RUN pacman -Syu --noconfirm && pacman -S --needed --noconfirm \
python \
wget \
sqlite \
valgrind \
gdk-pixbuf2 \
qrencode

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
python3-dev \
python-dev-is-python3 \
valgrind \
libsqlite3-dev \
libgdk-pixbuf-2.0-dev \
libqrencode-dev
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN dnf install -y \
readline-devel \
openssl-devel \
sqlite-devel \
valgrind \
gdk-pixbuf2-devel \
qrencode-devel

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.tumbleweed
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN zypper --non-interactive in --no-recommends \
python310-devel \
readline-devel \
sqlite3-devel \
valgrind \
gdk-pixbuf-devel \
qrencode-devel

Expand Down
1 change: 1 addition & 0 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
python3-dev \
python-dev-is-python3 \
valgrind \
libsqlite3-dev \
libgdk-pixbuf-2.0-dev \
libqrencode-dev
Expand Down
6 changes: 6 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,15 @@ my-prof.supp:
check-unit: tests/unittests/unittests
tests/unittests/unittests

@VALGRIND_CHECK_RULES@
VALGRIND_SUPPRESSIONS_FILES=prof.supp

format: $(all_c_sources)
clang-format -i $(all_c_sources)

format-sources: $(core_sources) $(main_source)
clang-format -i $^

spell:
codespell

Expand Down
29 changes: 26 additions & 3 deletions ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ error_handler()

log_content ./config.log
log_content ./test-suite.log
log_content ./test-suite-memcheck.log

echo
echo "Error ${ERR_CODE} with command '${BASH_COMMAND}' on line ${BASH_LINENO[0]}. Exiting."
Expand All @@ -39,7 +40,9 @@ tests=()
MAKE="make --quiet -j$(num_cores)"
CC="gcc"

case $(uname | tr '[:upper:]' '[:lower:]') in
ARCH="$(uname | tr '[:upper:]' '[:lower:]')"

case "$ARCH" in
linux*)
tests=(
"--enable-notifications --enable-icons-and-clipboard --enable-otr --enable-pgp
Expand All @@ -62,6 +65,7 @@ case $(uname | tr '[:upper:]' '[:lower:]') in
"--without-xscreensaver"
"--disable-gdk-pixbuf"
"")
source /etc/profile.d/debuginfod.sh 2>/dev/null || true
;;
darwin*)
tests=(
Expand Down Expand Up @@ -114,14 +118,33 @@ case $(uname | tr '[:upper:]' '[:lower:]') in
;;
esac

case "$ARCH" in
linux*)
echo
echo "--> Building with ./configure ${tests[0]} --enable-valgrind $*"
echo

# shellcheck disable=SC2086
./configure ${tests[0]} --enable-valgrind $*

$MAKE CC="${CC}"
if grep '^ID=' /etc/os-release | grep -q -e debian; then
$MAKE check-valgrind
else
$MAKE check-valgrind || log_content ./test-suite-memcheck.log
fi
$MAKE distclean
;;
esac

for features in "${tests[@]}"
do
echo
echo "--> Building with ./configure ${features}"
echo "--> Building with ./configure ${features} $*"
echo

# shellcheck disable=SC2086
./configure $features
./configure $features $*

$MAKE CC="${CC}"
$MAKE check
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ AC_ARG_ENABLE([gdk-pixbuf],
AC_ARG_ENABLE([omemo-qrcode],
[AS_HELP_STRING([--enable-omemo-qrcode], [enable ability to display omemo qr code])])

m4_include([m4/ax_valgrind_check.m4])
AX_VALGRIND_DFLT([drd], [off])
AX_VALGRIND_DFLT([helgrind], [off])
AX_VALGRIND_DFLT([sgcheck], [off])
AX_VALGRIND_CHECK

# Required dependencies

AC_CHECK_FUNCS([atexit memset strdup strstr])
Expand Down
7 changes: 7 additions & 0 deletions docs/profanity.1
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ may be set to DEBUG, INFO (the default), WARN or ERROR.
.BI "\-f, \-\-logfile"
Specify a different logfile
.TP
.BI "\-r, \-\-cmd"
Specify the commands that should be run right after starting up.
This can be given multiple times, e.g.
.EX
profanity --cmd /foo --cmd "/sleep 10" --cmd /quit
.EE
.TP
.BI "\-t, \-\-theme "THEME
Specify which theme to use.
.I THEME
Expand Down
Loading