From nobody Sat May 4 21:56:13 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=1606153069; cv=none; d=zohomail.com; s=zohoarc; b=OTUy3O2mervDq6Ee6D2aSDK31VijY1+BC5AaPBp9wxIS4EhsdZqjqLkTM/xLpFzmobvaqNemEmdkLAmP3RwLNtUve+X05MgMebED7JQmhtkihhfrmPqEn5x+ddraOGwBBjQVV5OFgZMjirumsdUlziLSZsFyAZ8SLYFdn8a5j1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606153069; 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=AAFChCiw4+9eHDqIETryJmR8A/nhspvOlBFrlt6cknQ=; b=QYFrc9exJDQlOdBsQ9XycYmoAB6y4AE5DNKPEJTQZwpb7FzxmPljW4hxSXKcvBR3z9F38Kva0qsGjV8496WB+rCkazLCEH2fS+3ruUPpzUnnH1BDwxT/sh0HkjjVPY43qfdkD2WPBCr5p3yxDrUp1fZTrTQRv9SMnt7FSNILzkM= 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 1606153069066290.51830235620116; Mon, 23 Nov 2020 09:37:49 -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-462-UUELSNT7M6S4Mr_vY5oxkw-1; Mon, 23 Nov 2020 12:37:44 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2978842390; Mon, 23 Nov 2020 17:37:39 +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 93DA919D80; Mon, 23 Nov 2020 17:37:37 +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 E04595002C; Mon, 23 Nov 2020 17:37:34 +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 0ANHbYdt028975 for ; Mon, 23 Nov 2020 12:37:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 09BCB6087C; Mon, 23 Nov 2020 17:37:34 +0000 (UTC) Received: from ridgehead.redhat.com (unknown [10.40.192.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 53B8E60864; Mon, 23 Nov 2020 17:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606153067; 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=AAFChCiw4+9eHDqIETryJmR8A/nhspvOlBFrlt6cknQ=; b=CLjSbqQscbaJTHMULQTJEpqfqSk98JVIhtIVKjvwWpkmLMJIW9AxYg2ztcSkPFMe7WWzrt tA621AGlTxcJqWe7ITE3GpXaJN36ow3Snzn2MYQuFCZYd+Rgcidwjbi2tXqTh67jvy0Q4c wItzYciNvVPjXMhHI1cPS6xFCj4p69Q= X-MC-Unique: UUELSNT7M6S4Mr_vY5oxkw-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v3] ci: Switch to meson build system Date: Mon, 23 Nov 2020 18:37:27 +0100 Message-Id: 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.84 on 10.5.11.23 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 a few environment variables we don't need with meson anymore. Signed-off-by: Erik Skultety --- v2: https://www.redhat.com/archives/libvir-list/2020-November/msg00380.html Since v2: - squashed both original patches into 1 - dropped some unnecessary code which meson handles implicitly ci/Makefile | 32 ++++++++------------------------ ci/build.sh | 29 +++-------------------------- 2 files changed, 11 insertions(+), 50 deletions(-) diff --git a/ci/Makefile b/ci/Makefile index c7c8eb9a45..6c253f0b1e 100644 --- a/ci/Makefile +++ b/ci/Makefile @@ -20,26 +20,8 @@ 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 +# Any extra arguments to pass to ninja +CI_NINJA_ARGS =3D =20 # Script containing environment preparation steps CI_PREPARE_SCRIPT =3D $(CI_ROOTDIR)/prepare.sh @@ -221,12 +203,15 @@ ci-run-command@%: ci-prepare-tree --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_CONT_SRCDIR=3D"$(CI_CONT_SRCDIR)" \ + CI_NINJA_ARGS=3D"$(CI_NINJA_ARGS)" \ $(CI_COMMAND) || exit 1' @test "$(CI_CLEAN)" =3D "1" && rm -rf $(CI_SCRATCHDIR) || : =20 @@ -236,8 +221,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 +251,5 @@ 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_NINJA_ARGS=3D - extra arguments passed to ninja" @echo diff --git a/ci/build.sh b/ci/build.sh index 2da84c080a..4530283cd8 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -7,32 +7,9 @@ # # 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, -# 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 - -make -j"$CI_SMP" $CI_MAKE_ARGS - -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 +meson build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt &&= exit 1) +ninja -C build $CI_NINJA_ARGS --=20 2.26.2