From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58557C433B4 for ; Fri, 16 Apr 2021 16:28:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D66F1613A9 for ; Fri, 16 Apr 2021 16:28:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D66F1613A9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXRKV-0002HG-T8 for qemu-devel@archiver.kernel.org; Fri, 16 Apr 2021 12:28:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXRJ0-0000eL-D1 for qemu-devel@nongnu.org; Fri, 16 Apr 2021 12:26:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXRIx-0000bT-SA for qemu-devel@nongnu.org; Fri, 16 Apr 2021 12:26:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618590411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=z2nDTnhB4JMlgOMvwKnb/4ZGZIMaaPgWntHgrO1i3W4=; b=FinPxTZ8Qyoklu7GhI81UBDEAU6JxBrW+g0hMw2C5JLTg8EyiZYbmR7qyiNlBuyl9DFr8B +f7OVoiwnJtabIGdR1MOdUkR7QSN4dSbQuAbF8JSHdzgEf6QF73deLqHdDkWtgOsf+2jLW JZrXI4uqMrL3B8jGWY8dQSX1yWW54hU= 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-46-80M-E84oNveSLX6IxfewNw-1; Fri, 16 Apr 2021 12:26:48 -0400 X-MC-Unique: 80M-E84oNveSLX6IxfewNw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94AA4801814; Fri, 16 Apr 2021 16:26:47 +0000 (UTC) Received: from localhost (ovpn-116-207.rdu2.redhat.com [10.10.116.207]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DCD35D6D3; Fri, 16 Apr 2021 16:26:37 +0000 (UTC) Date: Fri, 16 Apr 2021 11:39:00 -0400 From: Cleber Rosa To: Thomas Huth Subject: Re: [PATCH 1/8] Acceptance Jobs: preserve the cache for pip on GitLab CI Message-ID: <20210416153900.GA1914548@amachine.somewhere> References: <20210415215141.1865467-1-crosa@redhat.com> <20210415215141.1865467-2-crosa@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=crosa@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline Received-SPF: pass client-ip=170.10.133.124; envelope-from=crosa@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Beraldo Leal , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Cornelia Huck , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Willian Rampazzo , Auger Eric , qemu-s390x@nongnu.org, Willian Rampazzo , Alex =?iso-8859-1?Q?Benn=E9e?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 16, 2021 at 05:56:10AM +0200, Thomas Huth wrote: > On 15/04/2021 23.51, Cleber Rosa wrote: > > The acceptance jobs (via `make check-venv`) will setup a virtual > > environment, and after that install packages defined in > > tests/requirements.txt via pip. > >=20 > > Let's enable pip's default cache directory, so that we can save > > a bit on time/bandwidth. > >=20 > > Signed-off-by: Cleber Rosa > > --- > > .gitlab-ci.yml | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml > > index 52d65d6c04..9cc4676912 100644 > > --- a/.gitlab-ci.yml > > +++ b/.gitlab-ci.yml > > @@ -53,6 +53,7 @@ include: > > key: "${CI_JOB_NAME}-cache" > > paths: > > - ${CI_PROJECT_DIR}/avocado-cache > > + - ~/.cache/pip >=20 > Did you check whether this works? AFAIK the cache directories have to be > part of the project directory, see: >=20 > https://docs.gitlab.com/ee/ci/yaml/README.html#cache >=20 > We already tried to cache ~/avocado/data/cache in the past, but it did no= t > work and we had to move the cache manually to the current working directo= ry > (see commit 5896c539547). >=20 > Thomas You're absolutely right, it won't work like that. My bad. I was trying to avoid having to set variables or configurations, but something like the following will be needed: before_script: - export PIP_CACHE_DIR=3D${CI_PROJECT_DIR}/pip-cache - mkdir -p ${CI_PROJECT_DIR}/pip-cache cache: paths: - ${CI_PROJECT_DIR}/pip-cache Resulting in: Using cached avocado_framework-87.0-py3-none-any.whl (399 kB) And the likes of: https://gitlab.com/cleber.gnu/democi/-/jobs/1186910932#L166 I'll change that on v2. Thanks! - Cleber. --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeruW64tGuU1eD+m7ZX6NM6XyCfMFAmB5r5EACgkQZX6NM6Xy CfP+5hAApJ6gGMhrMmMyCzlUQUonRUcc/laCSIflgicuRTUhYalXsxspJkdnrrae ythz7NxhKrOqbZqyt5zdJok4p6Fnh1QjeKFhvvAJUxec3WpNujsZgO0nv+E/V3TD oIUYgF0ktR4fgE0vUTt+TzI3A5DuOtFzF244evVc8iB0/C1IrAI+MP4hCJ0uj81H QJPt0GQLPS5IzjyCQ2l628F+DbK949ZxmrfxHOisJH6YlBD65UjJwmeQK3vnnmjb zBgtjt0bgmA9QbbqVlDJQFLWdIo9pOEvyuoU8m/QE7fyjQZ95tgsG769a8t4YAv5 NAX0NqV6i7otr/dFA3xQcLNfhT5vok8qzZSaKPd/6kGIc2jb348rbLLfU01AxLDE AxpKZulipCy6EcAVRVUKnEGAFi68VBT/0bFv9BOO3UMouIAdkDBM73Lz5dk13f+i bPLf5Z2eUL5wuM2TZIq5st2RJH3eo2Y684eNccDcY9llnnBrWbOH5hc/rgR+T6/c g81OyjTcrPuRe/tEQUA2P6uP54fxtd62NatB7kO152kTL3EpXdxcPSuFqEcwdm2h Lz3x3J5eI+yanW5Bu3wORFXVKD+rfy/KQV/qu0qgTmzW//sUVqmTWlngY3gOpevv 5zJLCBr0kUvD5E6YgAbHeA1NfV8jFkoujtym8X1cmsL6uRaTPSA= =q6Yc -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz--