Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caching pip and git-lfs in CI #62

Closed
ismael-mendoza opened this issue Jul 1, 2020 · 2 comments
Closed

caching pip and git-lfs in CI #62

ismael-mendoza opened this issue Jul 1, 2020 · 2 comments
Assignees
Labels
feature New feature or request

Comments

@ismael-mendoza
Copy link
Collaborator

ismael-mendoza commented Jul 1, 2020

It might be nice to cache pip installation in the CI with like:

    - name: Cache pip
      uses: actions/cache@v2
      with:
        # This path is specific to Ubuntu
        path: ~/.cache/pip
        # Look to see if there is a cache hit for the corresponding requirements file
        key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-
          ${{ runner.os }}-

but I got inconsistent runs (sometimes taking longer than just installing) so more investigation is needed. It also caused an error for me in at least one test run

Also caching git-lfs might give us even more speed up: actions/checkout#165
but havent' tried it out yet.

@ismael-mendoza ismael-mendoza added the feature New feature or request label Jul 1, 2020
@ismael-mendoza ismael-mendoza self-assigned this Jul 1, 2020
@jeff-regier
Copy link
Contributor

git-lfs appears to only take a few seconds to run, so there's probably not much benefit to caching that data it pulls.

I wonder how much time we'd save by caching the dependencies pip installs.

@ismael-mendoza
Copy link
Collaborator Author

ismael-mendoza commented Jul 8, 2020

hmm good point, I tried caching pip once and it didn't really help much. I just assumed that I was doing it wrong but perhaps I wasn't. I'll close this for now, it consistently takes 2 min to pip install all dependencies which is not terrible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants