qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cleber Rosa <crosa@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"Beraldo Leal" <bleal@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	qemu-devel@nongnu.org,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Willian Rampazzo" <willianr@redhat.com>,
	"Auger Eric" <eric.auger@redhat.com>,
	qemu-s390x@nongnu.org, "Willian Rampazzo" <wrampazz@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Eduardo Habkost" <ehabkost@redhat.com>
Subject: Re: [PATCH 1/8] Acceptance Jobs: preserve the cache for pip on GitLab CI
Date: Fri, 16 Apr 2021 11:39:00 -0400	[thread overview]
Message-ID: <20210416153900.GA1914548@amachine.somewhere> (raw)
In-Reply-To: <af052ca5-aaaa-07f8-c2c0-e96132d4db5a@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1811 bytes --]

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.
> > 
> > Let's enable pip's default cache directory, so that we can save
> > a bit on time/bandwidth.
> > 
> > Signed-off-by: Cleber Rosa <crosa@redhat.com>
> > ---
> >   .gitlab-ci.yml | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > 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
> 
> Did you check whether this works? AFAIK the cache directories have to be
> part of the project directory, see:
> 
>  https://docs.gitlab.com/ee/ci/yaml/README.html#cache
> 
> We already tried to cache ~/avocado/data/cache in the past, but it did not
> work and we had to move the cache manually to the current working directory
> (see commit 5896c539547).
> 
>  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=${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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-04-16 16:28 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15 21:51 [PATCH 0/8] Tests: introduce custom jobs Cleber Rosa
2021-04-15 21:51 ` [PATCH 1/8] Acceptance Jobs: preserve the cache for pip on GitLab CI Cleber Rosa
2021-04-16  3:56   ` Thomas Huth
2021-04-16 15:39     ` Cleber Rosa [this message]
2021-04-15 21:51 ` [PATCH 2/8] Acceptance tests: do not try to reuse packages from the system Cleber Rosa
2021-04-16  5:07   ` Philippe Mathieu-Daudé
2021-04-16 15:39   ` Willian Rampazzo
2021-04-19 18:14   ` Wainer dos Santos Moschetta
2021-04-15 21:51 ` [PATCH 3/8] tests/acceptance/linux_ssh_mips_malta.py: drop identical setUp Cleber Rosa
2021-04-16  5:26   ` Philippe Mathieu-Daudé
2021-04-16 15:43     ` Cleber Rosa
2021-04-16 17:46       ` Philippe Mathieu-Daudé
2021-04-19 18:25         ` Wainer dos Santos Moschetta
2021-04-16 15:46     ` Willian Rampazzo
2021-04-16 15:41   ` Willian Rampazzo
2021-04-15 21:51 ` [PATCH 4/8] tests/acceptance/migration.py: cancel test if migration is not supported Cleber Rosa
2021-04-16  5:11   ` Philippe Mathieu-Daudé
2021-04-16 16:14     ` Cleber Rosa
2021-04-16 15:50   ` Willian Rampazzo
2021-04-19 18:46   ` Wainer dos Santos Moschetta
2021-04-15 21:51 ` [PATCH 5/8] tests/acceptance/cpu_queries.py: use the proper logging channels Cleber Rosa
2021-04-16  5:15   ` Philippe Mathieu-Daudé
2021-04-16 15:54     ` Willian Rampazzo
2021-04-16 16:17     ` Cleber Rosa
2021-04-16 15:54   ` Willian Rampazzo
2021-04-19 18:56   ` Wainer dos Santos Moschetta
2021-04-15 21:51 ` [PATCH 6/8] Acceptance tests: prevent shutdown on non-specific target tests Cleber Rosa
2021-04-16 15:56   ` Willian Rampazzo
2021-04-19 19:07   ` Wainer dos Santos Moschetta
2021-04-15 21:51 ` [PATCH 7/8] tests/acceptance/migration.py: cancel test on s390x Cleber Rosa
2021-04-19 19:11   ` Wainer dos Santos Moschetta
2021-04-19 19:35   ` Willian Rampazzo
2021-04-15 21:51 ` [PATCH 8/8] Tests: add custom test jobs Cleber Rosa
2021-04-16  5:23   ` Philippe Mathieu-Daudé
2021-04-16 16:25     ` Cleber Rosa
2021-04-16 16:22 ` [PATCH 0/8] Tests: introduce custom jobs Paolo Bonzini
2021-04-16 16:42   ` Cleber Rosa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210416153900.GA1914548@amachine.somewhere \
    --to=crosa@redhat.com \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=bleal@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    --cc=willianr@redhat.com \
    --cc=wrampazz@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).