From nobody Sun May 19 00:47:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1585589498; cv=none; d=zohomail.com; s=zohoarc; b=ee+U//lu4fXMFrH8mNw3Yssws1ZFbIxGf+3VzeL/ktLji/ZpM1wCn3ivvZirmWk9G8w2jxh1lywQZsbaUZaX2m/a8t4bI3DL6QJBSETgu2ZXkte5klJY/WgVwT05fPtk7QZsYG4IY1ZXcA6oHnAvrn6hKY9NRTIJu0QEFeEN1jE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585589498; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3SvRAZxDco0zNSebQvEAcfHJnYo43Jhvz38Zg1zlSAk=; b=IinRXPEbLIGTP0WJlNiLnBDUjDJffS43vlbg8WW/63wpHaGDcEjmFNYzFbmaFlIVIYKo68zzGs2HHlgiFi+NlMdXoX6kHPm0SKFLiYZncv3GkR2yR9Mu48Pd2xNprvkFGETKqpdUJCp/tqfQYj3W2JqZZWtM8qLTsYO/AinKt88= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 158558949859224.863835756216986; Mon, 30 Mar 2020 10:31:38 -0700 (PDT) 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-366-GSx_N47zOcWYixpI1hlIhg-1; Mon, 30 Mar 2020 13:31:34 -0400 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 417D8107B767; Mon, 30 Mar 2020 17:31:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 129DA60BEC; Mon, 30 Mar 2020 17:31:25 +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 B8A7118089D0; Mon, 30 Mar 2020 17:31:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02UHVCPg003759 for ; Mon, 30 Mar 2020 13:31:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 592961001B28; Mon, 30 Mar 2020 17:31:12 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.194.244]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8277E10016EB for ; Mon, 30 Mar 2020 17:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585589497; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3SvRAZxDco0zNSebQvEAcfHJnYo43Jhvz38Zg1zlSAk=; b=dboRW+FzT+dcPpObq2lkf2WdB//LG/ANbs+K86PiDHNEsIDWBR7s0QMQ9YcX8p6MOBSH7X GaFFgl7r6HIrX6wkQQc6ZQD0ND4UiNy7OAG9fKdbV4B0dy37giRcx4BcOjZk47Gr2EVmPP y4cPwQWPAa/mBd3GnwuBkuMOsN51+vI= X-MC-Unique: GSx_N47zOcWYixpI1hlIhg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] gitlab: Don't define $MAKE Date: Mon, 30 Mar 2020 19:31:02 +0200 Message-Id: <20200330173103.279741-2-abologna@redhat.com> In-Reply-To: <20200330173103.279741-1-abologna@redhat.com> References: <20200330173103.279741-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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 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" Since libvirt-jenkins-ci commit 27cfddee8835, paths to build tools such as ninja and make are exported in the container's environment and can be used directly. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index beeae1df05..3203434b99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,4 @@ variables: - MAKE: make GIT_DEPTH: 100 =20 stages: --=20 2.25.1 From nobody Sun May 19 00:47:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1585589487; cv=none; d=zohomail.com; s=zohoarc; b=grZK9G+Z9wghcP+WW9opfy9YTkqisneawI+wp1TxaUW5Ezlhq0HylR0CuNU/C3gpZYMkFCtEs9ZhWEim5LUdOFKVWsDr8pfYTHsCa27OOcPccQUFV9zDwFGLvjvf1S+YDWFiq0EfzA4cGCJZCUlLaf/5tkXI1mwk43WQC97B//Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585589487; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6MC9AYmNZesvAtVq0AvQv9VigHd16U1VfBlMSWSBkQo=; b=Ey1QCAJszvMZaMSWIKsELRECUb9gljEFLyvLhwaU7JseI8+HDHV/Nx4LIyMnFw8Mr+ztC4p9yCL/fh93wvKEg1vznI5c1/Z2TM2o16gprDCBG90ezPc4V7DXStLARQdzCI4AYIEErzYTpnNcbbGwso+Huj8r9tB/pJDW3LMh3/g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1585589487986903.5031667873218; Mon, 30 Mar 2020 10:31:27 -0700 (PDT) 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-468-ZvKp6uSsMDyl99DgkSVaPg-1; Mon, 30 Mar 2020 13:31:24 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D221DDB62; Mon, 30 Mar 2020 17:31:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9E9EF5C1B5; Mon, 30 Mar 2020 17:31:16 +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 E1EFC18089CD; Mon, 30 Mar 2020 17:31:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02UHVDlB003771 for ; Mon, 30 Mar 2020 13:31:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id BBD911001B28; Mon, 30 Mar 2020 17:31:13 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.40.194.244]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC57110016EB for ; Mon, 30 Mar 2020 17:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585589486; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=6MC9AYmNZesvAtVq0AvQv9VigHd16U1VfBlMSWSBkQo=; b=J72JAVUaAKv3Htfj7hYetpbTMOKLytxKE1aUUt7sd9J2kjJ0GKnfXJM8yUiPYQcb3ElKlr I0oV/L/G6mcl7wXBxODqZBMkOk23B2NnQdtqbiqYwj/9CsdaKijJI0rV4u2uQTcWf0WX+e zDuaN6+92ODyhmpg/a7D1b2pQ/DMdHo= X-MC-Unique: ZvKp6uSsMDyl99DgkSVaPg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] gitlab: Enable improved ccache usage Date: Mon, 30 Mar 2020 19:31:03 +0200 Message-Id: <20200330173103.279741-3-abologna@redhat.com> In-Reply-To: <20200330173103.279741-1-abologna@redhat.com> References: <20200330173103.279741-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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.16 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" Setting CC=3D"ccache cc" works in most cases, but sometimes it will break the build: in particular, we have experienced issues in the past with that approach when using cgo to build our Go bindings. A more robust approach is to have a directory containing symlinks from the compiler name to the ccache binary: in that case, ccache itself will invoke the compiler, and the build system will be none the wiser. Since libvirt-jenkins-ci commit 2563aebb6c5c, container images contain a suitable symlink directory, so all that's needed to enable the new approach is to add this directory to $PATH. Since we're touching this anyway, we make a few more changes: $CCACHE_DIR is no longer created manually, because ccache will take care of creating it for us if it doesn't already exist; the ccache setup is moved out of the job template and into script_variables, removing unnecessary duplication; a limit is set on the size of the cache (500 MB, which is twice the amount used by a fresh build on my Fedora 31 machine). Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- .gitlab-ci.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3203434b99..99e7b510c7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,10 @@ stages: =20 .script_variables: &script_variables | export MAKEFLAGS=3D"-j$(getconf _NPROCESSORS_ONLN)" + export CCACHE_BASEDIR=3D"$(pwd)" + export CCACHE_DIR=3D"$CCACHE_BASEDIR/ccache" + export CCACHE_MAXSIZE=3D"500M" + export PATH=3D"$CCACHE_WRAPPERSDIR:$PATH" =20 # Common templates =20 @@ -20,10 +24,6 @@ stages: key: "$CI_JOB_NAME" before_script: - *script_variables - - mkdir -p ccache - - export CC=3D"ccache gcc" - - export CCACHE_BASEDIR=3D${PWD} - - export CCACHE_DIR=3D${PWD}/ccache script: - mkdir build - cd build @@ -48,10 +48,6 @@ stages: key: "$CI_JOB_NAME" before_script: - *script_variables - - mkdir -p ccache - - export CC=3D"ccache ${ABI}-gcc" - - export CCACHE_BASEDIR=3D${PWD} - - export CCACHE_DIR=3D${PWD}/ccache script: - mkdir build - cd build --=20 2.25.1