Add Valgrind to CI

* Also pass `$*` to `configure` when invoking `ci-build.sh`, so one can
  e.g. run `./ci-build.sh --without-xscreensaver`

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
Steffen Jaeckel
2025-03-07 20:38:18 +01:00
parent c0da36c48d
commit 9fc0326428
19 changed files with 319 additions and 41 deletions

View File

@@ -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."
@@ -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
@@ -114,14 +117,29 @@ 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}"
$MAKE check-valgrind
$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