2017-12-06 09:56:49 -05: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 15:15:47 -04:00
|
|
|
###############################
|
|
|
|
# Filesystem interactions #
|
|
|
|
###############################
|
|
|
|
|
2018-12-20 15:12:51 -05: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 12:47:09 -05: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 15:12:51 -05:00
|
|
|
build --symlink_prefix=dist/
|
2017-11-02 15:15:47 -04:00
|
|
|
|
2018-10-25 20:02:50 -04:00
|
|
|
# Turn off legacy external runfiles
|
2019-10-30 21:00:56 -04:00
|
|
|
build --nolegacy_external_runfiles
|
2018-10-25 20:02:50 -04:00
|
|
|
run --nolegacy_external_runfiles
|
|
|
|
test --nolegacy_external_runfiles
|
|
|
|
|
2019-01-28 13:30:18 -05: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 08:26:03 -04: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 11:20:35 -05:00
|
|
|
###############################
|
|
|
|
# Release support #
|
2018-11-29 20:10:29 -05:00
|
|
|
# Turn on these settings with #
|
|
|
|
# --config=release #
|
2018-02-13 11:20:35 -05:00
|
|
|
###############################
|
|
|
|
|
2018-03-15 18:36:11 -04:00
|
|
|
# Releases should always be stamped with version control info
|
2018-12-03 14:43:21 -05:00
|
|
|
# This command assumes node on the path and is a workaround for
|
|
|
|
# https://github.com/bazelbuild/bazel/issues/4802
|
2020-04-20 17:45:34 -04:00
|
|
|
build:release --workspace_status_command="yarn -s ng-dev release build-env-stamp"
|
2020-01-21 19:22:20 -05:00
|
|
|
build:release --stamp
|
2018-02-13 11:20:35 -05:00
|
|
|
|
2017-11-02 15:15:47 -04: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 12:55:27 -05:00
|
|
|
################################
|
|
|
|
# Settings for CircleCI #
|
|
|
|
################################
|
2017-12-13 12:18:16 -05:00
|
|
|
|
2019-07-25 10:47:02 -04:00
|
|
|
# Bazel flags for CircleCI are in /.circleci/bazel.linux.rc and /.circleci/bazel.windows.rc
|
2018-05-03 13:40:31 -04:00
|
|
|
|
2020-02-04 14:45:40 -05: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 04:32:41 -04: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 14:45:40 -05:00
|
|
|
|
2018-05-03 13:40:31 -04:00
|
|
|
################################
|
|
|
|
# Temporary Settings for Ivy #
|
|
|
|
################################
|
2019-11-22 15:00:49 -05: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 15:17:20 -05:00
|
|
|
build:ivy --define=angular_ivy_enabled=True
|
2018-12-01 19:08:15 -05:00
|
|
|
|
2019-10-02 13:36:25 -04:00
|
|
|
##################################
|
|
|
|
# Remote Build Execution support #
|
|
|
|
# Turn on these settings with #
|
|
|
|
# --config=remote #
|
|
|
|
##################################
|
2018-12-01 19:08:15 -05:00
|
|
|
|
2019-10-24 00:26:15 -04: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 19:08:15 -05:00
|
|
|
|
|
|
|
# Increase the default number of jobs by 50% because our build has lots of
|
|
|
|
# parallelism
|
|
|
|
build:remote --jobs=150
|
2019-10-17 15:04:06 -04:00
|
|
|
build:remote --google_default_credentials
|
2018-12-01 19:08:15 -05:00
|
|
|
|
2019-11-18 15:20:40 -05: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
|
|
|
|
build:remote --host_javabase=@rbe_ubuntu1604_angular//java:jdk
|
|
|
|
build:remote --javabase=@rbe_ubuntu1604_angular//java:jdk
|
|
|
|
build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
|
|
|
|
build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
|
|
|
|
build:remote --crosstool_top=@rbe_ubuntu1604_angular//cc:toolchain
|
|
|
|
build:remote --extra_toolchains=@rbe_ubuntu1604_angular//config:cc-toolchain
|
2018-12-01 19:08:15 -05:00
|
|
|
build:remote --extra_execution_platforms=//tools:rbe_ubuntu1604-angular
|
|
|
|
build:remote --host_platform=//tools:rbe_ubuntu1604-angular
|
|
|
|
build:remote --platforms=//tools:rbe_ubuntu1604-angular
|
|
|
|
|
2019-10-11 12:50:58 -04:00
|
|
|
# Remote instance and caching
|
2018-12-01 19:08:15 -05:00
|
|
|
build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
|
2019-06-21 15:38:35 -04:00
|
|
|
build:remote --project_id=internal-200822
|
2019-06-21 18:13:39 -04:00
|
|
|
build:remote --remote_cache=remotebuildexecution.googleapis.com
|
2019-10-24 00:26:15 -04:00
|
|
|
build:remote --remote_executor=remotebuildexecution.googleapis.com
|
2019-03-13 11:57:26 -04:00
|
|
|
|
2020-01-13 17:40:21 -05: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
|
|
|
|
|
2019-06-20 12:13:33 -04: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
|