From 2fc156e5568f09bf7e1c7b8950f1d2ed5d13d587 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Mon, 24 Jan 2022 21:54:12 +0000 Subject: [PATCH] ci: Cache with the OS name, not the job name. The job name is just the constant `production_build`. Renaming it to have the OS in the key ensures that it is not shared across OS'es (for instance between `4.x` and `main`, which are now bionic and buster, respectively), and also allows it to share caches with the install step, which uses the OS name in that place. --- .github/workflows/production-suite.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/production-suite.yml b/.github/workflows/production-suite.yml index 512581274a..8ff5d147e3 100644 --- a/.github/workflows/production-suite.yml +++ b/.github/workflows/production-suite.yml @@ -66,22 +66,22 @@ jobs: uses: actions/cache@v2 with: path: /srv/zulip-npm-cache - key: v1-yarn-deps-${{ github.job }}-${{ hashFiles('package.json') }}-${{ hashFiles('yarn.lock') }} - restore-keys: v1-yarn-deps-${{ github.job }} + key: v1-yarn-deps-buster-${{ hashFiles('package.json') }}-${{ hashFiles('yarn.lock') }} + restore-keys: v1-yarn-deps-buster - name: Restore python cache uses: actions/cache@v2 with: path: /srv/zulip-venv-cache - key: v1-venv-${{ github.job }}-${{ hashFiles('requirements/dev.txt') }} - restore-keys: v1-venv-${{ github.job }} + key: v1-venv-buster-${{ hashFiles('requirements/dev.txt') }} + restore-keys: v1-venv-buster - name: Restore emoji cache uses: actions/cache@v2 with: path: /srv/zulip-emoji-cache - key: v1-emoji-${{ github.job }}-${{ hashFiles('tools/setup/emoji/emoji_map.json') }}-${{ hashFiles('tools/setup/emoji/build_emoji') }}-${{ hashFiles('tools/setup/emoji/emoji_setup_utils.py') }}-${{ hashFiles('tools/setup/emoji/emoji_names.py') }}-${{ hashFiles('package.json') }} - restore-keys: v1-emoji-${{ github.job }} + key: v1-emoji-buster-${{ hashFiles('tools/setup/emoji/emoji_map.json') }}-${{ hashFiles('tools/setup/emoji/build_emoji') }}-${{ hashFiles('tools/setup/emoji/emoji_setup_utils.py') }}-${{ hashFiles('tools/setup/emoji/emoji_names.py') }}-${{ hashFiles('package.json') }} + restore-keys: v1-emoji-buster - name: Build production tarball run: ./tools/ci/production-build