@@ -18,14 +18,17 @@ version: 2.1
18
18
# cache changes. For example:
19
19
# 1) yarn lock file changes --> cached "node_modules" are different.
20
20
# 2) bazel repository definitions change --> cached bazel repositories are different.
21
- # **NOTE 1 **: If you change the cache key prefix, also sync the restore_cache fallback to match.
21
+ # Windows needs its own cache key because binaries in node_modules are different.
22
+ # **NOTE 1 **: If you change the cache key prefix, also sync the cache_key_fallback to match.
22
23
# **NOTE 2 **: Keep the static part of the cache key as prefix to enable correct fallbacks.
23
24
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
24
25
var_3 : &cache_key v3-angular-node-10.16-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
26
+ var_4 : &cache_key_fallback v3-angular-node-10.16-
25
27
var_3_win : &cache_key_win v4-angular-win-node-12.0-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
28
+ var_4_win : &cache_key_win_fallback v4-angular-win-node-12.0-
26
29
27
30
# Initializes the CI environment by setting up common environment variables.
28
- var_4 : &init_environment
31
+ var_5 : &init_environment
29
32
run :
30
33
name : Initializing environment (setting up variables, overwriting Yarn)
31
34
# Overwrite the yarn installed in the docker container with our own version.
@@ -50,7 +53,7 @@ var_4_win: &init_environment_win
50
53
name : Setup windows node environment
51
54
command : ./.circleci/windows-env.ps1
52
55
53
- var_5 : &setup_bazel_remote_execution
56
+ var_6 : &setup_bazel_remote_execution
54
57
run :
55
58
name : " Setup bazel RBE remote execution"
56
59
command : |
@@ -112,14 +115,12 @@ var_10: &restore_cache
112
115
restore_cache :
113
116
keys :
114
117
- *cache_key
115
- # This fallback should be the cache_key without variables.
116
- - v3-angular-node-10.16-
118
+ - *cache_key_fallback
117
119
var_10_win : &restore_cache_win
118
120
restore_cache :
119
121
keys :
120
122
- *cache_key_win
121
- # This fallback should be the cache_key without variables.
122
- - v4-angular-win-node-12.0-
123
+ - *cache_key_fallback_win
123
124
124
125
# Branch filter that can be specified for jobs that should only run on publish branches
125
126
# (e.g. master or the patch branch)
0 commit comments