From 5fe27a9a975303dae1b4be8b016315169c0c876a Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Thu, 8 Sep 2022 20:59:28 -0400 Subject: [PATCH] github-actions: Add hash of requirements.txt to cache key of built pip packages The packages should be rebuilt if some of the shared dependencies change Signed-off-by: Jan Vesely --- .github/workflows/pnl-ci-docs.yml | 4 ++-- .github/workflows/pnl-ci.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pnl-ci-docs.yml b/.github/workflows/pnl-ci-docs.yml index a37c9e7a250..4821dfd103f 100644 --- a/.github/workflows/pnl-ci-docs.yml +++ b/.github/workflows/pnl-ci-docs.yml @@ -82,8 +82,8 @@ jobs: uses: actions/cache@v3 with: path: ${{ steps.pip_cache.outputs.pip_cache_dir }}/wheels - key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-v2-${{ github.sha }} - restore-keys: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-v2 + key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-${{ hashFiles('requirements.txt') }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-${{ hashFiles('requirements.txt') }} # We need to install all PNL deps since docs config imports psyneulink module - name: Install local, editable PNL package diff --git a/.github/workflows/pnl-ci.yml b/.github/workflows/pnl-ci.yml index b97eaa55ecf..2b1ffa648e6 100644 --- a/.github/workflows/pnl-ci.yml +++ b/.github/workflows/pnl-ci.yml @@ -67,8 +67,8 @@ jobs: uses: actions/cache@v3 with: path: ${{ steps.pip_cache.outputs.pip_cache_dir }}/wheels - key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-v2-${{ github.sha }} - restore-keys: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-v2 + key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-${{ hashFiles('requirements.txt') }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-${{ hashFiles('requirements.txt') }} - name: Install local, editable PNL package uses: ./.github/actions/install-pnl