1
0
mirror of https://github.com/squid-cache/squid.git synced 2025-04-18 22:04:07 +03:00

CI: Enable eCAP and Valgrind in layer build tests if possible (#1996)

Now these optional features are enabled during applicable layer tests if
their packages appear to be available on the build system. This should
help prevent regressions like the one fixed in recent commit 53ed1a9.
This commit is contained in:
Eduard Bagdasaryan 2025-03-16 22:03:22 +00:00 committed by Squid Anubis
parent 65ad598418
commit 8a13e36b98
4 changed files with 21 additions and 5 deletions

View File

@ -136,7 +136,7 @@ jobs:
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 build-dep squid
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} ccache
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} ccache valgrind
- name: Checkout sources
uses: actions/checkout@v4

View File

@ -16,6 +16,22 @@
action="${1}"
config="${2}"
# Allow a layer to enable optional default-disabled features when
# those features are supported in the current build environment
# (and we can easily detect such support).
if ${PKG_CONFIG:-pkg-config} --exists 'libecap >= 1.0 libecap < 1.1' 2>/dev/null
then
CONFIGURE_FLAGS_MAYBE_ENABLE_ECAP="--enable-ecap"
else
echo "WARNING: eCAP testing disabled" >&2
fi
if ${PKG_CONFIG:-pkg-config} --exists valgrind 2>/dev/null
then
CONFIGURE_FLAGS_MAYBE_ENABLE_VALGRIND="--with-valgrind-debug"
else
echo "WARNING: Valgrind testing disabled" >&2
fi
# cache_file may be set by environment variable
configcache=""
if [ -n "$cache_file" ]; then

View File

@ -37,11 +37,9 @@ MAKETEST="distcheck"
# We can't test them automatically everywhere without detecting those
# optional packages first.
#
# --enable-ecap \
# --enable-epoll \
# --enable-kqueue \
# --enable-win32-service \
# --with-valgrind-debug \
# --with-gnutls \
# --with-tdb \
# --with-cap \
@ -110,6 +108,8 @@ DISTCHECK_CONFIGURE_FLAGS=" \
--enable-build-info=squid\ test\ build \
--enable-ssl-crtd \
--with-openssl \
$CONFIGURE_FLAGS_MAYBE_ENABLE_ECAP \
$CONFIGURE_FLAGS_MAYBE_ENABLE_VALGRIND \
"
# Fix the distclean testing.

View File

@ -42,11 +42,9 @@ MAKETEST="distcheck"
# We can't test them automatically everywhere without detecting those
# optional packages first.
#
# --enable-ecap \
# --enable-epoll \
# --enable-kqueue \
# --enable-win32-service \
# --with-valgrind-debug \
# --with-ldap \
#
# --enable-cpu-profiling \ Requires CPU support.
@ -110,6 +108,8 @@ DISTCHECK_CONFIGURE_FLAGS=" \
--with-pic \
--with-pthreads \
--enable-build-info=squid\ test\ build \
$CONFIGURE_FLAGS_MAYBE_ENABLE_ECAP \
$CONFIGURE_FLAGS_MAYBE_ENABLE_VALGRIND \
"
# Fix the distclean testing.