From af4e0615239c46cee0055a5c4cd2e4034d4306ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= Date: Fri, 7 Oct 2022 10:21:25 -0700 Subject: [PATCH] Circle CI: do not share .git cache across different operating systems (#34885) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34885 We use workflows extensively in Circle CI, so caching a git checkout should help speed up tests when downstream jobs need to checkout the repository. In the current configuration, the Windows job is most likely to run and write to the .git cache first, which results in permission issues when the .git cache is loaded onto macOS or linux hosts. By splitting the cache by architecture, we may lose on some reusability across jobs with distinct architectures, but it ensures we avoid cross-platform permission issues. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D40150781 fbshipit-source-id: 4a4b2a4da5e20f754b72db0c9852c7c1616b610c --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 92d5cc3d22..8ca0b0ddcd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -133,12 +133,12 @@ commands: steps: - restore_cache: keys: - - << parameters.checkout_base_cache_key >>-{{ .Branch }}-{{ .Revision }} - - << parameters.checkout_base_cache_key >>-{{ .Branch }}- - - << parameters.checkout_base_cache_key >> + - << parameters.checkout_base_cache_key >>-{{ arch }}-{{ .Branch }}-{{ .Revision }} + - << parameters.checkout_base_cache_key >>-{{ arch }}-{{ .Branch }}- + - << parameters.checkout_base_cache_key >>-{{ arch }}- - checkout - save_cache: - key: << parameters.checkout_base_cache_key >>-{{ .Branch }}-{{ .Revision }} + key: << parameters.checkout_base_cache_key >>-{{ arch }}-{{ .Branch }}-{{ .Revision }} paths: - ".git"