-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
74 lines (57 loc) · 2.9 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
# Configurations for testing with Bazel
# Select a configuration by running `bazel test //my:target --config={headless, gui, local_device}`
# Headless instrumentation tests
test:headless --test_arg=--enable_display=false
# Graphical instrumentation tests. Ensure that $DISPLAY is set.
test:gui --test_env=DISPLAY
test:gui --test_arg=--enable_display=true
# Testing with a local emulator or device. Ensure that `adb devices` lists the device.
# Run tests serially.
test:local_device --test_strategy=exclusive
# Use the local device broker type, as opposed to WRAPPED_EMULATOR.
test:local_device --test_arg=--device_broker_type=LOCAL_ADB_SERVER
# Uncomment and set $device_id if there is more than one connected device.
# test:local_device --test_arg=--device_serial_number=$device_id
test --flaky_test_attempts=3
# The unified launcher runs in Python 2 host configuration
# https://github.com/bazelbuild/bazel/issues/7899
build --host_force_python=PY2
# ------------------------
# General RBE configuration
# ------------------------
build:remote --jobs=100
# Java toolchain setup
build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
build:remote --host_javabase=@rbe_default//java:jdk
build:remote --javabase=@rbe_default//java:jdk
# C++ toolchain setup
build:remote --extra_toolchains=@rbe_default//config:cc-toolchain
build:remote --crosstool_top=@rbe_default//cc:toolchain
# Remote instance setup
build:remote --remote_instance_name=projects/bazel-untrusted/instances/default_instance
build:remote --project_id=bazel-untrusted
# Set various strategies so that all actions execute remotely. Mixing remote
# and local execution will lead to errors unless the toolchain and remote
# machine exactly match the host machine.
build:remote --spawn_strategy=remote
build:remote --define=EXECUTOR=remote
# Enable the remote cache so action results can be shared across machines,
# developers, and workspaces.
build:remote --remote_cache=remotebuildexecution.googleapis.com
# Enable remote execution so actions are performed on the remote systems.
build:remote --remote_executor=remotebuildexecution.googleapis.com
# Enable authentication. This will pick up application default credentials by
# default.
build:remote --google_default_credentials
# -------------------------------------------
# Custom RBE configuration for Android builds
# -------------------------------------------
build:remote_android --config=remote # Reuse general configuration
# Platform configuration
build:remote_android --extra_execution_platforms=:android_platform
build:remote_android --host_platform=:android_platform
build:remote_android --platforms=:android_platform
build:remote_android --strategy=DexBuilder=remote
build:remote_android --noexperimental_check_desugar_deps # Workaround for singlejar incompatibility with RBE
build:remote_android --incompatible_strict_action_env