| 
									
										
										
										
											2017-12-06 06:56:49 -08:00
										 |  |  | # Enable debugging tests with --config=debug | 
					
						
							|  |  |  | test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-02 12:15:47 -07:00
										 |  |  | ############################### | 
					
						
							|  |  |  | # Filesystem interactions     # | 
					
						
							|  |  |  | ############################### | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-20 12:12:51 -08:00
										 |  |  | # Create symlinks in the project: | 
					
						
							|  |  |  | # - dist/bin for outputs | 
					
						
							|  |  |  | # - dist/testlogs, dist/genfiles | 
					
						
							|  |  |  | # - bazel-out | 
					
						
							|  |  |  | # NB: bazel-out should be excluded from the editor configuration. | 
					
						
							|  |  |  | # The checked-in /.vscode/settings.json does this for VSCode. | 
					
						
							|  |  |  | # Other editors may require manual config to ignore this directory. | 
					
						
							|  |  |  | # In the past, we say a problem where VSCode traversed a massive tree, opening file handles and | 
					
						
							| 
									
										
										
										
											2018-02-22 09:47:09 -08:00
										 |  |  | # eventually a surprising failure with auto-discovery of the C++ toolchain in | 
					
						
							|  |  |  | # MacOS High Sierra. | 
					
						
							|  |  |  | # See https://github.com/bazelbuild/bazel/issues/4603 | 
					
						
							| 
									
										
										
										
											2018-12-20 12:12:51 -08:00
										 |  |  | build --symlink_prefix=dist/ | 
					
						
							| 
									
										
										
										
											2017-11-02 12:15:47 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-25 17:02:50 -07:00
										 |  |  | # Turn off legacy external runfiles | 
					
						
							| 
									
										
										
										
											2019-10-30 18:00:56 -07:00
										 |  |  | build --nolegacy_external_runfiles | 
					
						
							| 
									
										
										
										
											2018-10-25 17:02:50 -07:00
										 |  |  | run --nolegacy_external_runfiles | 
					
						
							|  |  |  | test --nolegacy_external_runfiles | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-28 10:30:18 -08:00
										 |  |  | # Turn on --incompatible_strict_action_env which was on by default | 
					
						
							|  |  |  | # in Bazel 0.21.0 but turned off again in 0.22.0. Follow | 
					
						
							|  |  |  | # https://github.com/bazelbuild/bazel/issues/7026 for more details. | 
					
						
							|  |  |  | # This flag is needed to so that the bazel cache is not invalidated | 
					
						
							|  |  |  | # when running bazel via `yarn bazel`. | 
					
						
							|  |  |  | # See https://github.com/angular/angular/issues/27514. | 
					
						
							|  |  |  | build --incompatible_strict_action_env | 
					
						
							|  |  |  | run --incompatible_strict_action_env | 
					
						
							|  |  |  | test --incompatible_strict_action_env | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-04 14:26:03 +02:00
										 |  |  | # Do not build runfile trees by default. If an execution strategy relies on runfile | 
					
						
							|  |  |  | # symlink teee, the tree is created on-demand. See: https://github.com/bazelbuild/bazel/issues/6627 | 
					
						
							|  |  |  | # and https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df | 
					
						
							|  |  |  | build --nobuild_runfile_links | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-13 08:20:35 -08:00
										 |  |  | ############################### | 
					
						
							|  |  |  | # Release support             # | 
					
						
							| 
									
										
										
										
											2018-11-29 17:10:29 -08:00
										 |  |  | # Turn on these settings with # | 
					
						
							|  |  |  | #  --config=release           # | 
					
						
							| 
									
										
										
										
											2018-02-13 08:20:35 -08:00
										 |  |  | ############################### | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-15 15:36:11 -07:00
										 |  |  | # Releases should always be stamped with version control info | 
					
						
							| 
									
										
										
										
											2018-12-03 19:43:21 +00:00
										 |  |  | # This command assumes node on the path and is a workaround for | 
					
						
							|  |  |  | # https://github.com/bazelbuild/bazel/issues/4802 | 
					
						
							| 
									
										
										
										
											2020-12-11 12:51:29 -08:00
										 |  |  | build:release --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=release" | 
					
						
							| 
									
										
										
										
											2020-01-21 16:22:20 -08:00
										 |  |  | build:release --stamp | 
					
						
							| 
									
										
										
										
											2018-02-13 08:20:35 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-12-11 12:51:29 -08:00
										 |  |  | # Snapshots should also be stamped with version control information. | 
					
						
							|  |  |  | build:snapshot --workspace_status_command="yarn -s ng-dev release build-env-stamp --mode=snapshot" | 
					
						
							|  |  |  | build:snapshot --stamp | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-02 12:15:47 -07:00
										 |  |  | ############################### | 
					
						
							|  |  |  | # Output                      # | 
					
						
							|  |  |  | ############################### | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # A more useful default output mode for bazel query | 
					
						
							|  |  |  | # Prints eg. "ng_module rule //foo:bar" rather than just "//foo:bar" | 
					
						
							|  |  |  | query --output=label_kind | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # By default, failing tests don't print any output, it goes to the log file | 
					
						
							|  |  |  | test --test_output=errors | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-25 09:55:27 -08:00
										 |  |  | ################################ | 
					
						
							|  |  |  | # Settings for CircleCI        # | 
					
						
							|  |  |  | ################################ | 
					
						
							| 
									
										
										
										
											2017-12-13 09:18:16 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-25 15:47:02 +01:00
										 |  |  | # Bazel flags for CircleCI are in /.circleci/bazel.linux.rc and /.circleci/bazel.windows.rc | 
					
						
							| 
									
										
										
										
											2018-05-03 10:40:31 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-04 11:45:40 -08:00
										 |  |  | ################################## | 
					
						
							|  |  |  | # Settings for integration tests # | 
					
						
							|  |  |  | ################################## | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Trick bazel into treating BUILD files under integration/bazel as being regular files | 
					
						
							|  |  |  | # This lets us glob() up all the files inside this integration test to make them inputs to tests | 
					
						
							|  |  |  | # (Note, we cannot use common --deleted_packages because the bazel version command doesn't support it) | 
					
						
							| 
									
										
										
										
											2020-06-25 01:32:41 -07:00
										 |  |  | build --deleted_packages=integration/bazel,integration/bazel/src,integration/bazel/src/hello-world,integration/bazel/test,integration/bazel/tools,integration/bazel/test/e2e | 
					
						
							|  |  |  | query --deleted_packages=integration/bazel,integration/bazel/src,integration/bazel/src/hello-world,integration/bazel/test,integration/bazel/tools,integration/bazel/test/e2e | 
					
						
							| 
									
										
										
										
											2020-02-04 11:45:40 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-03 10:40:31 -07:00
										 |  |  | ################################ | 
					
						
							|  |  |  | # Temporary Settings for Ivy   # | 
					
						
							|  |  |  | ################################ | 
					
						
							| 
									
										
										
										
											2019-11-22 12:00:49 -08:00
										 |  |  | # To determine if the compiler used should be Ivy instead of ViewEngine, one can use `--config=ivy` | 
					
						
							|  |  |  | # on any bazel target. This is a temporary flag until codebase is permanently switched to Ivy. | 
					
						
							|  |  |  | build --define=angular_ivy_enabled=False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | build:view-engine --define=angular_ivy_enabled=False | 
					
						
							| 
									
										
										
										
											2019-11-22 12:17:20 -08:00
										 |  |  | build:ivy --define=angular_ivy_enabled=True | 
					
						
							| 
									
										
										
										
											2018-12-01 16:08:15 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-02 10:36:25 -07:00
										 |  |  | ################################## | 
					
						
							|  |  |  | # Remote Build Execution support # | 
					
						
							|  |  |  | # Turn on these settings with    # | 
					
						
							|  |  |  | #  --config=remote               # | 
					
						
							|  |  |  | ################################## | 
					
						
							| 
									
										
										
										
											2018-12-01 16:08:15 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-23 21:26:15 -07:00
										 |  |  | # The following --define=EXECUTOR=remote will be able to be removed | 
					
						
							|  |  |  | # once https://github.com/bazelbuild/bazel/issues/7254 is fixed | 
					
						
							|  |  |  | build:remote --define=EXECUTOR=remote | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Set a higher timeout value, just in case. | 
					
						
							|  |  |  | build:remote --remote_timeout=600 | 
					
						
							| 
									
										
										
										
											2018-12-01 16:08:15 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Increase the default number of jobs by 50% because our build has lots of | 
					
						
							|  |  |  | # parallelism | 
					
						
							|  |  |  | build:remote --jobs=150 | 
					
						
							| 
									
										
										
										
											2019-10-17 12:04:06 -07:00
										 |  |  | build:remote --google_default_credentials | 
					
						
							| 
									
										
										
										
											2018-12-01 16:08:15 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-18 12:20:40 -08:00
										 |  |  | # Force remote exeuctions to consider the entire run as linux | 
					
						
							|  |  |  | build:remote --cpu=k8 | 
					
						
							|  |  |  | build:remote --host_cpu=k8 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-15 13:45:20 -04:00
										 |  |  | # Toolchain and platform related flags | 
					
						
							| 
									
										
										
										
											2021-04-22 16:34:57 +02:00
										 |  |  | build:remote --crosstool_top=//dev-infra/bazel/remote-execution/cpp:cc_toolchain_suite | 
					
						
							|  |  |  | build:remote --extra_toolchains=//dev-infra/bazel/remote-execution/cpp:cc_toolchain | 
					
						
							|  |  |  | build:remote --extra_execution_platforms=//dev-infra/bazel/remote-execution:platform | 
					
						
							|  |  |  | build:remote --host_platform=//dev-infra/bazel/remote-execution:platform | 
					
						
							|  |  |  | build:remote --platforms=//dev-infra/bazel/remote-execution:platform | 
					
						
							| 
									
										
										
										
											2018-12-01 16:08:15 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-11 09:50:58 -07:00
										 |  |  | # Remote instance and caching | 
					
						
							| 
									
										
										
										
											2021-06-23 21:32:44 -07:00
										 |  |  | build:remote --remote_instance_name=projects/internal-200822/instances/primary_instance | 
					
						
							| 
									
										
										
										
											2019-06-21 12:38:35 -07:00
										 |  |  | build:remote --project_id=internal-200822 | 
					
						
							| 
									
										
										
										
											2019-06-21 15:13:39 -07:00
										 |  |  | build:remote --remote_cache=remotebuildexecution.googleapis.com | 
					
						
							| 
									
										
										
										
											2019-10-23 21:26:15 -07:00
										 |  |  | build:remote --remote_executor=remotebuildexecution.googleapis.com | 
					
						
							| 
									
										
										
										
											2019-03-13 16:57:26 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-13 14:40:21 -08:00
										 |  |  | ################################## | 
					
						
							|  |  |  | # Saucelabs tests settings       # | 
					
						
							|  |  |  | # Turn on these settings with    # | 
					
						
							|  |  |  | #  --config=saucelabs            # | 
					
						
							|  |  |  | ################################## | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # For saucelabs tests we don't want to enable flaky test attempts. Karma has its own integrated | 
					
						
							|  |  |  | # retry mechanism and we do not want to retry unnecessarily if Karma already tried multiple times. | 
					
						
							|  |  |  | test:saucelabs --flaky_test_attempts=1 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-15 16:33:48 -07:00
										 |  |  | ################ | 
					
						
							|  |  |  | # Flag Aliases # | 
					
						
							|  |  |  | ################ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # --ng_perf will ask the Ivy compiler to produce performance results for each build. | 
					
						
							|  |  |  | build --flag_alias=ng_perf=//packages/compiler-cli:ng_perf | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-20 18:13:33 +02:00
										 |  |  | #################################################### | 
					
						
							|  |  |  | # User bazel configuration | 
					
						
							|  |  |  | # NOTE: This needs to be the *last* entry in the config. | 
					
						
							|  |  |  | #################################################### | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Load any settings which are specific to the current user. Needs to be *last* statement | 
					
						
							|  |  |  | # in this config, as the user configuration should be able to overwrite flags from this file. | 
					
						
							|  |  |  | try-import .bazelrc.user |