Include OS and CPU architecture in CircleCI cache keys

This commit is contained in:
Kamil Śliwak 2021-10-07 18:09:18 +02:00
parent b0a5b92fe9
commit 24c8a608c4

View File

@ -627,14 +627,14 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- dependencies-osx-{{ checksum ".circleci/osx_install_dependencies.sh" }} - dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
# DO NOT EDIT between here and save_cache, but rather edit ./circleci/osx_install_dependencies.sh # DO NOT EDIT between here and save_cache, but rather edit ./circleci/osx_install_dependencies.sh
# WARNING! If you do edit anything here instead, remember to invalidate the cache manually. # WARNING! If you do edit anything here instead, remember to invalidate the cache manually.
- run: - run:
name: Install build dependencies name: Install build dependencies
command: ./.circleci/osx_install_dependencies.sh command: ./.circleci/osx_install_dependencies.sh
- save_cache: - save_cache:
key: dependencies-osx-{{ checksum ".circleci/osx_install_dependencies.sh" }} key: dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
paths: paths:
- /usr/local/bin - /usr/local/bin
- /usr/local/sbin - /usr/local/sbin
@ -663,7 +663,7 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- dependencies-osx-{{ checksum ".circleci/osx_install_dependencies.sh" }} - dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
- attach_workspace: - attach_workspace:
at: . at: .
- run: *run_soltest - run: *run_soltest
@ -679,7 +679,7 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- dependencies-osx-{{ checksum ".circleci/osx_install_dependencies.sh" }} - dependencies-osx-{{ arch }}-{{ checksum ".circleci/osx_install_dependencies.sh" }}
- attach_workspace: - attach_workspace:
at: . at: .
- run: *run_cmdline_tests - run: *run_cmdline_tests
@ -886,14 +886,14 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- dependencies-win-{{ checksum "scripts/install_deps.ps1" }} - dependencies-win-{{ arch }}-{{ checksum "scripts/install_deps.ps1" }}
# DO NOT EDIT between here and save_cache, but rather edit .\scripts\install_deps.ps1 # DO NOT EDIT between here and save_cache, but rather edit .\scripts\install_deps.ps1
# WARNING! If you do edit anything here instead, remember to invalidate the cache manually. # WARNING! If you do edit anything here instead, remember to invalidate the cache manually.
- run: - run:
name: "Installing dependencies" name: "Installing dependencies"
command: .\scripts\install_deps.ps1 command: .\scripts\install_deps.ps1
- save_cache: - save_cache:
key: dependencies-win-{{ checksum "scripts/install_deps.ps1" }} key: dependencies-win-{{ arch }}-{{ checksum "scripts/install_deps.ps1" }}
paths: paths:
- .\deps - .\deps
- run: - run: