@@ -13,7 +13,7 @@ var_1: &docker_image circleci/node:10.16
13
13
# the new cache key prefix. This allows us to take advantage of CircleCI's fallback caching.
14
14
# Read more here: https://circleci.com/docs/2.0/caching/#restoring-cache.
15
15
var_2 : &cache_key v4-ng-mat-{{ checksum "WORKSPACE" }}-{{ checksum "yarn.lock" }}
16
- var_3 : &cache_fallback_key v4 -ng-mat-
16
+ var_3 : &cache_fallback_key v5 -ng-mat-
17
17
18
18
# Settings common to each job
19
19
var_4 : &job_defaults
@@ -49,47 +49,30 @@ var_7: &save_cache
49
49
# Decryption token that is used to decode the GCP credentials file in ".circleci/gcp_token".
50
50
var_8 : &gcp_decrypt_token "angular"
51
51
52
- # Job step that ensures that the node module dependencies are installed and up-to-date. We use
53
- # Yarn with the frozen lockfile option in order to make sure that lock file and package.json are
54
- # in sync. Unlike in Travis, we don't need to manually purge the node modules if stale because
55
- # CircleCI automatically discards the cache if the checksum of the lock file has changed.
56
- var_9 : &yarn_install
57
- run :
58
- name : " Installing project dependencies"
59
- command : yarn install --frozen-lockfile --non-interactive
60
-
61
- # Anchor that can be used to download and install Yarn globally in the bash environment.
62
- var_10 : &yarn_download
63
- run :
64
- name : " Downloading and installing Yarn"
65
- command : |
66
- touch $BASH_ENV
67
- curl -o- -L https://yarnpkg.com/install.sh | PROFILE=$BASH_ENV bash -s -- --version "1.16.0"
68
-
69
52
# Sets up the Bazel config which is specific for CircleCI builds.
70
- var_11 : &setup_bazel_ci_config
53
+ var_9 : &setup_bazel_ci_config
71
54
run :
72
55
name : " Setting up Bazel configuration for CI"
73
56
command : |
74
57
echo "import %workspace%/.circleci/bazel.rc" >> ./.bazelrc
75
58
76
59
# Sets up a different Docker image that includes a moe recent Firefox version which
77
60
# is needed for headless testing.
78
- var_12 : &docker-firefox-image
61
+ var_10 : &docker-firefox-image
79
62
# TODO(devversion): Temporarily use a image that includes Firefox 62 because the
80
63
# ngcontainer image does include an old Firefox version that does not support headless.
81
64
- image : circleci/node:11.4.0-browsers
82
65
83
66
# Attaches the release output which has been stored in the workspace to the current job.
84
67
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
85
- var_13 : &attach_release_output
68
+ var_11 : &attach_release_output
86
69
attach_workspace :
87
70
at : dist/
88
71
89
72
# Branch filter that we can specify for jobs that should only run on publish branches. This filter
90
73
# is used to ensure that not all upstream branches will be published as Github builds
91
74
# (e.g. revert branches, feature branches)
92
- var_14 : &publish_branches_filter
75
+ var_12 : &publish_branches_filter
93
76
branches :
94
77
only :
95
78
- master
@@ -103,31 +86,31 @@ var_14: &publish_branches_filter
103
86
# In order to reduce duplication we use a YAML anchor that just always excludes the "_presubmit"
104
87
# branch. We don't want to run Circle for the temporary "_presubmit" branch which is reserved
105
88
# for the caretaker.
106
- var_15 : &ignore_presubmit_branch_filter
89
+ var_13 : &ignore_presubmit_branch_filter
107
90
branches :
108
91
ignore :
109
92
- " _presubmit"
110
93
- " ivy-2019"
111
94
112
95
# Runs a script that sets up the Bazel remote execution. This will be used by jobs that run
113
96
# Bazel primarily and should benefit from remote caching and execution.
114
- var_16 : &setup_bazel_remote_execution
97
+ var_14 : &setup_bazel_remote_execution
115
98
run :
116
99
name : " Setup bazel RBE remote execution"
117
100
command : ./scripts/circleci/bazel/setup-remote-execution.sh
118
101
119
102
# Sets up the bazel binary globally. We don't want to access bazel through Yarn and NodeJS
120
103
# because it could mean that the Bazel child process only has access to limited memory.
121
- var_17 : &setup_bazel_binary
104
+ var_15 : &setup_bazel_binary
122
105
run :
123
106
name : " Setting up global Bazel binary"
124
107
command : ./scripts/circleci/setup_bazel_binary.sh
125
108
126
109
# **Note**: When updating the beginning of the cache key, also update the fallback cache
127
110
# key to match the new cache key prefix. This allows us to take advantage of CircleCI's
128
111
# fallback caching. Read more here: https://circleci.com/docs/2.0/caching/#restoring-cache.
129
- var_18 : &mdc_deps_cache_key v1-mdc-deps-{{ checksum "/tmp/material-components-web/package-lock.json" }}
130
- var_19 : &mdc_deps_fallback_cache_key v1-mdc-deps-
112
+ var_16 : &mdc_deps_cache_key v1-mdc-deps-{{ checksum "/tmp/material-components-web/package-lock.json" }}
113
+ var_17 : &mdc_deps_fallback_cache_key v1-mdc-deps-
131
114
132
115
# -----------------------------
133
116
# Container version of CircleCI
@@ -153,8 +136,6 @@ jobs:
153
136
- *restore_cache
154
137
- *setup_bazel_ci_config
155
138
- *setup_bazel_remote_execution
156
- - *yarn_download
157
- - *yarn_install
158
139
- *setup_bazel_binary
159
140
160
141
- run : bazel build src/...
@@ -173,8 +154,6 @@ jobs:
173
154
- *restore_cache
174
155
- *setup_bazel_ci_config
175
156
- *setup_bazel_remote_execution
176
- - *yarn_download
177
- - *yarn_install
178
157
- *setup_bazel_binary
179
158
180
159
- run : bazel test tools/public_api_guard/...
@@ -192,8 +171,6 @@ jobs:
192
171
- *restore_cache
193
172
- *setup_bazel_ci_config
194
173
- *setup_bazel_remote_execution
195
- - *yarn_download
196
- - *yarn_install
197
174
- *setup_bazel_binary
198
175
199
176
- run : bazel test src/... --build_tag_filters=e2e --test_tag_filters=e2e
@@ -212,8 +189,6 @@ jobs:
212
189
- *restore_cache
213
190
- *setup_bazel_ci_config
214
191
- *setup_bazel_remote_execution
215
- - *yarn_download
216
- - *yarn_install
217
192
- *setup_bazel_binary
218
193
219
194
- run : bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e
@@ -231,8 +206,6 @@ jobs:
231
206
steps :
232
207
- *checkout_code
233
208
- *restore_cache
234
- - *yarn_download
235
- - *yarn_install
236
209
237
210
- run : ./scripts/circleci/run-browserstack-tests.sh
238
211
@@ -252,8 +225,6 @@ jobs:
252
225
steps :
253
226
- *checkout_code
254
227
- *restore_cache
255
- - *yarn_download
256
- - *yarn_install
257
228
258
229
- run : ./scripts/circleci/run-saucelabs-tests.sh
259
230
@@ -266,8 +237,6 @@ jobs:
266
237
steps :
267
238
- *checkout_code
268
239
- *restore_cache
269
- - *yarn_download
270
- - *yarn_install
271
240
272
241
- run : yarn gulp ci:prerender
273
242
@@ -279,8 +248,6 @@ jobs:
279
248
steps :
280
249
- *checkout_code
281
250
- *restore_cache
282
- - *yarn_download
283
- - *yarn_install
284
251
285
252
- run : ./scripts/circleci/lint-bazel-files.sh
286
253
- run : yarn gulp ci:lint
@@ -297,8 +264,6 @@ jobs:
297
264
steps :
298
265
- *checkout_code
299
266
- *restore_cache
300
- - *yarn_download
301
- - *yarn_install
302
267
303
268
- run : yarn gulp ci:build-release-packages
304
269
- run : yarn check-release-output
@@ -351,8 +316,6 @@ jobs:
351
316
- *attach_release_output
352
317
- *setup_bazel_ci_config
353
318
- *setup_bazel_remote_execution
354
- - *yarn_download
355
- - *yarn_install
356
319
- *setup_bazel_binary
357
320
358
321
# CircleCI has a config setting to enforce SSH for all github connections.
@@ -380,8 +343,6 @@ jobs:
380
343
- *restore_cache
381
344
- *setup_bazel_ci_config
382
345
- *setup_bazel_remote_execution
383
- - *yarn_download
384
- - *yarn_install
385
346
- *setup_bazel_binary
386
347
387
348
- run : node ./scripts/circleci/setup-angular-snapshots.js --tag master
@@ -401,8 +362,6 @@ jobs:
401
362
- *restore_cache
402
363
- *setup_bazel_ci_config
403
364
- *setup_bazel_remote_execution
404
- - *yarn_download
405
- - *yarn_install
406
365
- *setup_bazel_binary
407
366
408
367
# Setup Angular ivy snapshots built with ngtsc but locked to a specific tag. We
@@ -433,8 +392,6 @@ jobs:
433
392
- *restore_cache
434
393
- *setup_bazel_ci_config
435
394
- *setup_bazel_remote_execution
436
- - *yarn_download
437
- - *yarn_install
438
395
- *setup_bazel_binary
439
396
440
397
# Setup Angular ivy snapshots built with ngtsc.
@@ -464,8 +421,6 @@ jobs:
464
421
- *setup_bazel_binary
465
422
- *setup_bazel_ci_config
466
423
- *setup_bazel_remote_execution
467
- - *yarn_download
468
- - *yarn_install
469
424
470
425
- run : git clone ${MDC_REPO_URL} --branch ${MDC_REPO_BRANCH} --depth 1 ${MDC_REPO_TMP_DIR}
471
426
- restore_cache :
0 commit comments