2018-01-25 12:55:27 -05:00
|
|
|
# These options are enabled when running on CI
|
|
|
|
# We do this by copying this file to /etc/bazel.bazelrc at the start of the build.
|
2018-12-01 19:08:15 -05:00
|
|
|
# See documentation in /docs/BAZEL.md
|
2018-01-25 12:55:27 -05:00
|
|
|
|
2019-02-04 11:11:26 -05:00
|
|
|
# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
|
|
|
|
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
|
|
|
|
build --repository_cache=/home/circleci/bazel_repository_cache
|
|
|
|
|
2018-01-25 12:55:27 -05:00
|
|
|
# Don't be spammy in the logs
|
2019-07-25 10:40:05 -04:00
|
|
|
build --noshow_progress
|
2018-01-25 12:55:27 -05:00
|
|
|
|
2018-04-02 19:34:48 -04:00
|
|
|
# Print all the options that apply to the build.
|
|
|
|
# This helps us diagnose which options override others
|
|
|
|
# (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
|
|
|
|
build --announce_rc
|
|
|
|
|
2018-01-25 12:55:27 -05:00
|
|
|
# Workaround https://github.com/bazelbuild/bazel/issues/3645
|
|
|
|
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
|
2018-03-07 20:26:03 -05:00
|
|
|
# Limit Bazel to consuming resources that fit in CircleCI "xlarge" class
|
2018-01-25 12:55:27 -05:00
|
|
|
# https://circleci.com/docs/2.0/configuration-reference/#resource_class
|
2018-03-07 20:26:03 -05:00
|
|
|
build --local_resources=14336,8.0,1.0
|
2018-01-25 12:55:27 -05:00
|
|
|
|
|
|
|
# Retry in the event of flakes, eg. https://circleci.com/gh/angular/angular/31309
|
|
|
|
test --flaky_test_attempts=2
|
2018-08-02 00:02:36 -04:00
|
|
|
|
|
|
|
# More details on failures
|
|
|
|
build --verbose_failures=true
|
2019-07-09 13:36:51 -04:00
|
|
|
|
|
|
|
# We have seen some flakiness in using TS workers on CircleCI
|
|
|
|
# https://angular-team.slack.com/archives/C07DT5M6V/p1562693245183400
|
|
|
|
# > failures like `ERROR: /home/circleci/ng/packages/core/test/BUILD.bazel:5:1:
|
|
|
|
# > Compiling TypeScript (devmode) //packages/core/test:test_lib failed: Worker process did not return a WorkResponse:`
|
|
|
|
# > I saw that issue a couple times today.
|
|
|
|
# > Example job: https://circleci.com/gh/angular/angular/385517
|
|
|
|
# We expect that TypeScript compilations will parallelize wider than the number of local cores anyway
|
|
|
|
# so we should saturate remote workers with TS compilations
|
2019-08-12 17:10:01 -04:00
|
|
|
build --strategy=AngularTemplateCompile=local
|
|
|
|
build --strategy=TypeScriptCompile=local
|