ci: test minimum configuration

Disabling drivers and optional libraries was not tested.
Add a new target in test-meson-builds.sh and GHA with just the minimum
to run test-null.sh and any other optional component disabled.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
This commit is contained in:
David Marchand 2021-11-17 12:28:43 +01:00 committed by Thomas Monjalon
parent 897e55c8d2
commit bd93fc6830
3 changed files with 12 additions and 0 deletions

View File

@ -87,6 +87,10 @@ OPTS="$OPTS -Dplatform=generic"
OPTS="$OPTS --default-library=$DEF_LIB" OPTS="$OPTS --default-library=$DEF_LIB"
OPTS="$OPTS --buildtype=debugoptimized" OPTS="$OPTS --buildtype=debugoptimized"
OPTS="$OPTS -Dcheck_includes=true" OPTS="$OPTS -Dcheck_includes=true"
if [ "$MINI" = "true" ]; then
OPTS="$OPTS -Denable_drivers=bus/vdev,mempool/ring,net/null"
OPTS="$OPTS -Ddisable_libs=*"
fi
meson build --werror $OPTS meson build --werror $OPTS
ninja -C build ninja -C build

View File

@ -21,6 +21,7 @@ jobs:
CC: ccache ${{ matrix.config.compiler }} CC: ccache ${{ matrix.config.compiler }}
DEF_LIB: ${{ matrix.config.library }} DEF_LIB: ${{ matrix.config.library }}
LIBABIGAIL_VERSION: libabigail-1.8 LIBABIGAIL_VERSION: libabigail-1.8
MINI: ${{ matrix.config.mini != '' }}
PPC64LE: ${{ matrix.config.cross == 'ppc64le' }} PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
REF_GIT_TAG: none REF_GIT_TAG: none
RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }} RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
@ -32,6 +33,10 @@ jobs:
- os: ubuntu-18.04 - os: ubuntu-18.04
compiler: gcc compiler: gcc
library: static library: static
- os: ubuntu-18.04
compiler: gcc
library: shared
mini: mini
- os: ubuntu-18.04 - os: ubuntu-18.04
compiler: gcc compiler: gcc
library: shared library: shared

View File

@ -220,6 +220,9 @@ for c in gcc clang ; do
done done
done done
build build-mini cc skipABI $use_shared -Ddisable_libs=* \
-Denable_drivers=bus/vdev,mempool/ring,net/null
# test compilation with minimal x86 instruction set # test compilation with minimal x86 instruction set
# Set the install path for libraries to "lib" explicitly to prevent problems # Set the install path for libraries to "lib" explicitly to prevent problems
# with pkg-config prefixes if installed in "lib/x86_64-linux-gnu" later. # with pkg-config prefixes if installed in "lib/x86_64-linux-gnu" later.