[v2,1/5] ci: test minimum configuration

Message ID 20211117112847.7362-2-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series Extend optional libraries list |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/iol-testing warning apply patch failure

Commit Message

David Marchand Nov. 17, 2021, 11:28 a.m. UTC
  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>
---
Changes since v1:
- dropped target cleanup in test-meson-builds.sh, this will be handled
  in a separate series in the future,
- disabled all drivers but mempool/ring and net/null,
  required to pass test-null.sh. bus/vdev is explicitly enabled for 

---
 .ci/linux-build.sh            | 4 ++++
 .github/workflows/build.yml   | 5 +++++
 devtools/test-meson-builds.sh | 3 +++
 3 files changed, 12 insertions(+)
  

Comments

Thomas Monjalon Nov. 17, 2021, 11:50 a.m. UTC | #1
17/11/2021 12:28, David Marchand:
> 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>
> ---
> Changes since v1:
> - dropped target cleanup in test-meson-builds.sh, this will be handled
>   in a separate series in the future,
> - disabled all drivers but mempool/ring and net/null,
>   required to pass test-null.sh. bus/vdev is explicitly enabled for 

Acked-by: Thomas Monjalon <thomas@monjalon.net>
  
Aaron Conole Nov. 17, 2021, 1:38 p.m. UTC | #2
David Marchand <david.marchand@redhat.com> writes:

> 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>
> ---
> Changes since v1:
> - dropped target cleanup in test-meson-builds.sh, this will be handled
>   in a separate series in the future,
> - disabled all drivers but mempool/ring and net/null,
>   required to pass test-null.sh. bus/vdev is explicitly enabled for 
>

Acked-by: Aaron Conole <aconole@redhat.com>
  

Patch

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index ef0bd099be..6e8bd7baa9 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -87,6 +87,10 @@  OPTS="$OPTS -Dplatform=generic"
 OPTS="$OPTS --default-library=$DEF_LIB"
 OPTS="$OPTS --buildtype=debugoptimized"
 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
 ninja -C build
 
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4151cafee7..2e9c4be6d0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -21,6 +21,7 @@  jobs:
       CC: ccache ${{ matrix.config.compiler }}
       DEF_LIB: ${{ matrix.config.library }}
       LIBABIGAIL_VERSION: libabigail-1.8
+      MINI: ${{ matrix.config.mini != '' }}
       PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
       REF_GIT_TAG: none
       RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
@@ -32,6 +33,10 @@  jobs:
           - os: ubuntu-18.04
             compiler: gcc
             library: static
+          - os: ubuntu-18.04
+            compiler: gcc
+            library: shared
+            mini: mini
           - os: ubuntu-18.04
             compiler: gcc
             library: shared
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 9ec8e2bc7e..4ed61328b9 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -220,6 +220,9 @@  for c in gcc clang ; do
 	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
 # 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.