Skip to content

Commit

Permalink
CI: setup-dependent pip cache (huggingface#16751)
Browse files Browse the repository at this point in the history
* Setup-dependent pip cache

* Do not restore from old versions
  • Loading branch information
gante authored Apr 13, 2022
1 parent ac43a40 commit 0b8f697
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/add-model-like.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ jobs:
id: cache
with:
path: ~/.cache/pip
key: v1-tests_model_like
restore-keys: |
v1-tests_model_like-${{ hashFiles('setup.py') }}
v1-tests_model_like
key: v1-tests_model_like-${{ hashFiles('setup.py') }}

- name: Install dependencies
run: |
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/model-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ jobs:
id: cache
with:
path: ~/.cache/pip
key: v1.2-tests_templates
restore-keys: |
v1.2-tests_templates-${{ hashFiles('setup.py') }}
v1.2-tests_templates
key: v1.2-tests_templates-${{ hashFiles('setup.py') }}

- name: Install dependencies
run: |
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/update_metdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Loading cache.
uses: actions/cache@v2
id: cache
with:
path: ~/.cache/pip
key: v1-metadata
restore-keys: |
v1-metadata-${{ hashFiles('setup.py') }}
v1-metadata
key: v1-metadata-${{ hashFiles('setup.py') }}

- name: Setup environment
run: |
Expand All @@ -33,4 +30,3 @@ jobs:
- name: Update metadata
run: |
python utils/update_metadata.py --token ${{ secrets.SYLVAIN_HF_TOKEN }} --commit_sha ${{ github.sha }}

0 comments on commit 0b8f697

Please sign in to comment.