@@ -116,6 +116,13 @@ var_16: &setup_bazel_remote_execution
116116 name : " Setup bazel RBE remote execution"
117117 command : ./scripts/circleci/bazel/setup-remote-execution.sh
118118
119+ # Sets up the bazel binary globally. We don't want to access bazel through Yarn and NodeJS
120+ # because it could mean that the Bazel child process only has access to limited memory.
121+ var_17 : &setup_bazel_binary
122+ run :
123+ name : " Setting up global Bazel binary"
124+ command : ./scripts/circleci/setup_bazel_binary.sh
125+
119126# -----------------------------
120127# Container version of CircleCI
121128# -----------------------------
@@ -138,12 +145,13 @@ jobs:
138145 steps :
139146 - *checkout_code
140147 - *restore_cache
148+ - *setup_bazel_binary
141149 - *setup_bazel_ci_config
142150 - *setup_bazel_remote_execution
143151 - *yarn_download
144152 - *yarn_install
145153
146- - run : yarn bazel build src/... --build_tag_filters=-docs-package
154+ - run : bazel build src/... --build_tag_filters=-docs-package
147155
148156 # --------------------------------------------------------------------------------------------
149157 # Job that runs ts-api-guardian against our API goldens in "tools/public_api_guard".
@@ -157,12 +165,13 @@ jobs:
157165 steps :
158166 - *checkout_code
159167 - *restore_cache
168+ - *setup_bazel_binary
160169 - *setup_bazel_ci_config
161170 - *setup_bazel_remote_execution
162171 - *yarn_download
163172 - *yarn_install
164173
165- - run : yarn bazel test tools/public_api_guard/...
174+ - run : bazel test tools/public_api_guard/...
166175
167176 # -----------------------------------------------------------------
168177 # Job that runs the e2e tests with Protractor and Chromium headless
@@ -175,12 +184,13 @@ jobs:
175184 steps :
176185 - *checkout_code
177186 - *restore_cache
187+ - *setup_bazel_binary
178188 - *setup_bazel_ci_config
179189 - *setup_bazel_remote_execution
180190 - *yarn_download
181191 - *yarn_install
182192
183- - run : yarn bazel test src/... --test_tag_filters=e2e
193+ - run : bazel test src/... --test_tag_filters=e2e
184194
185195 # ------------------------------------------------------------------------------------------
186196 # Job that runs the unit tests on locally installed browsers (Chrome and Firefox headless).
@@ -194,12 +204,13 @@ jobs:
194204 steps :
195205 - *checkout_code
196206 - *restore_cache
207+ - *setup_bazel_binary
197208 - *setup_bazel_ci_config
198209 - *setup_bazel_remote_execution
199210 - *yarn_download
200211 - *yarn_install
201212
202- - run : yarn bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e
213+ - run : bazel test src/... --build_tag_filters=-e2e --test_tag_filters=-e2e
203214
204215 # ----------------------------------------------------------------------------
205216 # Job that runs the unit tests on Browserstack. The browsers that will be used
@@ -343,6 +354,7 @@ jobs:
343354 - *checkout_code
344355 - *restore_cache
345356 - *attach_release_output
357+ - *setup_bazel_binary
346358 - *setup_bazel_ci_config
347359 - *setup_bazel_remote_execution
348360 - *yarn_download
@@ -355,7 +367,7 @@ jobs:
355367
356368 # TODO(devversion): Ideally the "build_release_packages" job should build all packages with
357369 # Bazel, but for now we mix up the Gulp and bazel setup, so we need to build the package here.
358- - run : yarn bazel build src/material-examples:npm_package --config=release
370+ - run : bazel build src/material-examples:npm_package --config=release
359371
360372 - run : ./scripts/circleci/publish-snapshots.sh
361373
@@ -392,6 +404,7 @@ jobs:
392404 steps :
393405 - *checkout_code
394406 - *restore_cache
407+ - *setup_bazel_binary
395408 - *setup_bazel_ci_config
396409 - *setup_bazel_remote_execution
397410 - *yarn_download
@@ -409,8 +422,8 @@ jobs:
409422 # Issue is tracked with FW-1004.
410423 - run : sed -i "s/\(_ENABLE_NG_TYPE_CHECKING = \)True/\1False/g" tools/defaults.bzl
411424 # Run project tests with ngtsc and the Ivy Angular packages.
412- - run : yarn bazel build src/... --build_tag_filters=-docs-package --define=compile=aot
413- - run : yarn bazel test src/... --build_tag_filters=-docs-package --define=compile=aot --test_tag_filters=-e2e
425+ - run : bazel build src/... --build_tag_filters=-docs-package --define=compile=aot
426+ - run : bazel test src/... --build_tag_filters=-docs-package --define=compile=aot --test_tag_filters=-e2e
414427
415428 # ----------------------------------------------------------------------------
416429 # Job that runs all Bazel tests against Ivy from angular/angular#master.
@@ -423,6 +436,7 @@ jobs:
423436 steps :
424437 - *checkout_code
425438 - *restore_cache
439+ - *setup_bazel_binary
426440 - *setup_bazel_ci_config
427441 - *setup_bazel_remote_execution
428442 - *yarn_download
@@ -435,8 +449,8 @@ jobs:
435449 # Issue is tracked with FW-1004.
436450 - run : sed -i "s/\(_ENABLE_NG_TYPE_CHECKING = \)True/\1False/g" tools/defaults.bzl
437451 # Run project tests with ngtsc and the Ivy Angular packages.
438- - run : yarn bazel build src/... --build_tag_filters=-docs-package --define=compile=aot
439- - run : yarn bazel test src/... --build_tag_filters=-docs-package --define=compile=aot --test_tag_filters=-e2e
452+ - run : bazel build src/... --build_tag_filters=-docs-package --define=compile=aot
453+ - run : bazel test src/... --build_tag_filters=-docs-package --define=compile=aot --test_tag_filters=-e2e
440454
441455# ----------------------------------------------------------------------------------------
442456# Workflow definitions. A workflow usually groups multiple jobs together. This is useful if
0 commit comments