From 0b8f697219a71d1fe2a8a359b2786a4d58f36e48 Mon Sep 17 00:00:00 2001 From: Joao Gante Date: Wed, 13 Apr 2022 16:19:14 +0100 Subject: [PATCH] CI: setup-dependent pip cache (#16751) * Setup-dependent pip cache * Do not restore from old versions --- .github/workflows/add-model-like.yml | 5 +---- .github/workflows/model-templates.yml | 5 +---- .github/workflows/update_metdata.yml | 8 ++------ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/add-model-like.yml b/.github/workflows/add-model-like.yml index a6932d90f..70afd6d3d 100644 --- a/.github/workflows/add-model-like.yml +++ b/.github/workflows/add-model-like.yml @@ -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: | diff --git a/.github/workflows/model-templates.yml b/.github/workflows/model-templates.yml index d51529a24..e330cb49e 100644 --- a/.github/workflows/model-templates.yml +++ b/.github/workflows/model-templates.yml @@ -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: | diff --git a/.github/workflows/update_metdata.yml b/.github/workflows/update_metdata.yml index c48b0c6bf..7fc007a09 100644 --- a/.github/workflows/update_metdata.yml +++ b/.github/workflows/update_metdata.yml @@ -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: | @@ -33,4 +30,3 @@ jobs: - name: Update metadata run: | python utils/update_metadata.py --token ${{ secrets.SYLVAIN_HF_TOKEN }} --commit_sha ${{ github.sha }} -