forked from google/mesop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
103 lines (81 loc) · 4.1 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# From: https://github.com/protocolbuffers/protobuf/issues/12393#issuecomment-1504349780
build --cxxopt=-std=c++14
build --host_cxxopt=-std=c++14
# Following is forked from: https://github.com/angular/components/blob/59c8bb9a14c61c3932d6701994366f05ef719a91/.bazelrc
# Removes "Remote Execution Setup" section since it's configured specifically for Angular team.
###############################
# Filesystem interactions #
###############################
# Performance: avoid stat'ing input files
build --watchfs
# Turn off legacy external runfiles
build --nolegacy_external_runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles
# This flag is needed to so that the bazel cache is not invalidated
# when running bazel via `yarn bazel`.
build --incompatible_strict_action_env
# Do not build runfile forests by default. If an execution strategy relies on runfile
# forests, the forest is created on-demand. See: https://github.com/bazelbuild/bazel/issues/6627
# and https://github.com/bazelbuild/bazel/commit/03246077f948f2790a83520e7dccc2625650e6df
build --nobuild_runfile_links
###############################
# Output control #
###############################
# 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
####################################
# Stamping configurations. #
# Run with "--config=release" or #
# "--config=snapshot-build". #
####################################
# Configures script to do version stamping.
# See https://docs.bazel.build/versions/master/user-manual.html#flag--workspace_status_command
build:release --workspace_status_command="yarn -s ng-dev:stamp --mode=release"
build:release --stamp
build:snapshot-build --workspace_status_command="yarn -s ng-dev:stamp --mode=snapshot"
build:snapshot-build --stamp
####################################
# Bazel custom flags #
####################################
build --flag_alias=partial_compilation=@npm//@angular/bazel/src:partial_compilation
##################################
# Always enable Ivy compilation #
##################################
build --define=angular_ivy_enabled=True
################################
# Sandbox settings #
################################
# By default, network access should be disabled unless explicitly granted for certain targets
# using the `requires-network` tag. https://docs.bazel.build/versions/main/be/common-definitions.html
build --sandbox_default_allow_network=false
test --sandbox_default_allow_network=false
################################
# --config=build-results #
################################
# Sets up Build Event Service if the `builds-results` configuration is used. We
# do not upload build results by default as this makes us reliant on external servers
# that could cause builds to fail unnecessarily. If desired, build result uploading
# can be manually uploaded, but given that the build event service server has been
# less stable than the remote executors, we do not want to degrade CI stability.
build:build-results --bes_instance_name=internal-200822
build:build-results --bes_backend=buildeventservice.googleapis.com
build:build-results --bes_timeout=60s
build:build-results --bes_results_url="https://source.cloud.google.com/results/invocations/"
# Set remote caching settings
build:remote --remote_accept_cached=true
################################
# --config=debug #
################################
# 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
################################
# Local Environment Setup #
# Needs to be last statement #
################################
# 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