From nobody Thu May 16 11:29:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1606467152; cv=none; d=zohomail.com; s=zohoarc; b=JAXJPDw3ZabWY1j63qcCCArLRDTbVayMp2iJiptkhRLXVFGOKihGgYSfNQdNvKozpY9X8cuZsXZ1S6/bQsFDdc5t2wQJdNm2bQpl+n21ev+5oPW19k0ynCSfwWvpPohMCxY/NwebGAn76mK64roEziUSyb/tnoJP/f2sWkkJ53I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606467152; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=uNgO3bRsyQobX5cn5DlLIk8nldzUDOBZRkxZ7b44UpA=; b=Jl5oSEJ86q7aK2vQfVxaeVPuVby78S0FmHPWDAbTxCGCyUCrRu7OS3J3537L0/Ky7oxQ2vGs/lMxCR0qfhyyTrcLIXt893IMbUlyKrHcpfaK28yGMZpz7qygn8RdrcEiGEECnGI5ZpZfgFNLN7JJ9BMlIJfHCqqrXT+k8MTZrB4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1606467152415138.47659267431732; Fri, 27 Nov 2020 00:52:32 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-526--hm6jhCEMQ6iAWMby6aY3A-1; Fri, 27 Nov 2020 03:52:28 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08EC7809DC3; Fri, 27 Nov 2020 08:52:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DADD060BF1; Fri, 27 Nov 2020 08:52:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4AED14BB7B; Fri, 27 Nov 2020 08:52:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AR8kxMC024142 for ; Fri, 27 Nov 2020 03:46:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8671360862; Fri, 27 Nov 2020 08:46:59 +0000 (UTC) Received: from ridgehead.redhat.com (unknown [10.40.192.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id D16D060861; Fri, 27 Nov 2020 08:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606467151; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uNgO3bRsyQobX5cn5DlLIk8nldzUDOBZRkxZ7b44UpA=; b=cJIBIa7F4jGn3sUu7BzofcpZQD7zSi+ujs++ep6loSq8lKMSDYR5bZ6nimoV+OBdBUrkau tUZmh3IbKuiQBRfnNhxtGMkByvydtSpaj84emAFX4i4Yn4VUZSaHbxidPYuO8hLHkIL4F9 BGipVW/lckeaXZIuKiIWlL3SlPVsp8c= X-MC-Unique: -hm6jhCEMQ6iAWMby6aY3A-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v4] ci: Switch to meson build system Date: Fri, 27 Nov 2020 09:46:54 +0100 Message-Id: <9528729b855907e0f07f510a2304d4a657112b8f.1606466617.git.eskultet@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Erik Skultety X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add meson required bits to the ci logic in the repo to be able to run a meson build in a container. This patch also drops several environment variables we don't need with meson anymore. Signed-off-by: Erik Skultety --- v3: https://www.redhat.com/archives/libvir-list/2020-November/msg01293.html Since v3: - further review comments - introduced CI_MESON_ARGS variable ci/Makefile | 38 +++++++------------------------------- ci/build.sh | 29 ++++++----------------------- 2 files changed, 13 insertions(+), 54 deletions(-) diff --git a/ci/Makefile b/ci/Makefile index c7c8eb9a45..d9d14f82c2 100644 --- a/ci/Makefile +++ b/ci/Makefile @@ -20,27 +20,6 @@ CI_HOST_SRCDIR =3D $(CI_SCRATCHDIR)/src # the $(CI_HOST_SRCDIR) directory from the host CI_CONT_SRCDIR =3D $(CI_USER_HOME)/libvirt =20 -# Relative directory to perform the build in. This -# defaults to using a separate build dir, but can be -# set to empty string for an in-source tree build. -CI_VPATH =3D build - -# The directory holding the build output inside the -# container. -CI_CONT_BUILDDIR =3D $(CI_CONT_SRCDIR)/$(CI_VPATH) - -# Can be overridden with mingw{32,64}-configure if desired -CI_CONFIGURE =3D $(CI_CONT_SRCDIR)/configure - -# Default to using all possible CPUs -CI_SMP =3D $(shell getconf _NPROCESSORS_ONLN) - -# Any extra arguments to pass to make -CI_MAKE_ARGS =3D - -# Any extra arguments to pass to configure -CI_CONFIGURE_ARGS =3D - # Script containing environment preparation steps CI_PREPARE_SCRIPT =3D $(CI_ROOTDIR)/prepare.sh =20 @@ -220,13 +199,10 @@ ci-run-command@%: ci-prepare-tree --login \ --user=3D"#$(CI_UID)" \ --group=3D"#$(CI_GID)" \ - CONFIGURE_OPTS=3D"$$CONFIGURE_OPTS" \ + MESON_OPTS=3D"$$MESON_OPTS" \ CI_CONT_SRCDIR=3D"$(CI_CONT_SRCDIR)" \ - CI_CONT_BUILDDIR=3D"$(CI_CONT_BUILDDIR)" \ - CI_SMP=3D"$(CI_SMP)" \ - CI_CONFIGURE=3D"$(CI_CONFIGURE)" \ - CI_CONFIGURE_ARGS=3D"$(CI_CONFIGURE_ARGS)" \ - CI_MAKE_ARGS=3D"$(CI_MAKE_ARGS)" \ + CI_MESON_ARGS=3D"$(CI_MESON_ARGS)" \ + CI_NINJA_ARGS=3D"$(CI_NINJA_ARGS)" \ $(CI_COMMAND) || exit 1' @test "$(CI_CLEAN)" =3D "1" && rm -rf $(CI_SCRATCHDIR) || : =20 @@ -236,8 +212,8 @@ ci-shell@%: ci-build@%: $(MAKE) -C $(CI_ROOTDIR) ci-run-command@$* CI_COMMAND=3D"$(CI_USER_HOME)/= build" =20 -ci-check@%: - $(MAKE) -C $(CI_ROOTDIR) ci-build@$* CI_MAKE_ARGS=3D"check" +ci-test@%: + $(MAKE) -C $(CI_ROOTDIR) ci-build@$* CI_NINJA_ARGS+=3Dtest =20 ci-list-images: @echo @@ -266,6 +242,6 @@ ci-help: @echo " CI_CLEAN=3D0 - do not delete '$(CI_SCRATCHDIR)' after= completion" @echo " CI_REUSE=3D1 - re-use existing '$(CI_SCRATCHDIR)' con= tent" @echo " CI_ENGINE=3Dauto - container engine to use (podman, docke= r)" - @echo " CI_CONFIGURE_ARGS=3D - extra arguments passed to configure" - @echo " CI_MAKE_ARGS=3D - extra arguments passed to make, e.g. s= pace delimited list of targets" + @echo " CI_MESON_ARGS=3D - extra arguments passed to meson" + @echo " CI_NINJA_ARGS=3D - extra arguments passed to ninja" @echo diff --git a/ci/build.sh b/ci/build.sh index 2da84c080a..740b46a935 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -7,32 +7,15 @@ # # to make. =20 -mkdir -p "$CI_CONT_BUILDDIR" || exit 1 -cd "$CI_CONT_BUILDDIR" +cd "$CI_CONT_SRCDIR" =20 export VIR_TEST_DEBUG=3D1 -NOCONFIGURE=3D1 "$CI_CONT_SRCDIR/autogen.sh" || exit 1 =20 -# $CONFIGURE_OPTS is a env that can optionally be set in the container, +# $MESON_OPTS is an env that can optionally be set in the container, # populated at build time from the Dockerfile. A typical use case would -# be to pass --host/--target args to trigger cross-compilation -# -# This can be augmented by make local args in $CI_CONFIGURE_ARGS -"$CI_CONFIGURE" $CONFIGURE_OPTS $CI_CONFIGURE_ARGS -if test $? !=3D 0; then - test -f config.log && cat config.log - exit 1 -fi -find -name test-suite.log -delete +# be to pass options to trigger cross-compilation =20 -make -j"$CI_SMP" $CI_MAKE_ARGS +meson build --werror $MESON_OPTS $CI_MESON_ARGS || \ +(cat build/meson-logs/meson-log.txt && exit 1) =20 -if test $? !=3D 0; then \ - LOGS=3D$(find -name test-suite.log) - if test "$LOGS"; then - echo "=3D=3D=3D LOG FILE(S) START =3D=3D=3D" - cat $LOGS - echo "=3D=3D=3D LOG FILE(S) END =3D=3D=3D" - fi - exit 1 -fi +ninja -C build $CI_NINJA_ARGS --=20 2.26.2