forked from dfinity/ic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
112 lines (85 loc) · 5.15 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
104
105
106
107
108
109
110
111
112
# To require no rustfmt issues, pass --config=fmt.
# To require no clippy issues, pass --config=clippy. Without this, warnings will still be generated.
# To enable both of the above, pass --config=lint.
# --config=ci implies --config=lint
build:ci --config=lint
# --config=lint implies both --config=fmt and --config=clippy.
build:lint --config=fmt
build:lint --config=clippy
common --experimental_allow_tags_propagation
build --nosandbox_default_allow_network
build --incompatible_strict_action_env # use an environment with a static value for PATH and do not inherit LD_LIBRARY_PATH
# default to optimized and unstripped binaries.
build --compilation_mode=opt
build --@rules_rust//:extra_rustc_flags=-Cdebug-assertions=on
build --strip=never
build --strategy_regexp=ic-os/.*=local
build --incompatible_remote_results_ignore_disk # Do not apply `--noremote_upload_local_results` to the disk cache.
build --remote_cache=buildfarm.zh1-idx1.dfinity.network
build --experimental_remote_cache_async
build --incompatible_remote_build_event_upload_respect_no_cache
build --noremote_upload_local_results # Whether to upload locally executed action results to the remote cache.
build --remote_timeout=30s # Defauilt is 60s.
build:ci --remote_timeout=5m # Defauilt is 60s.
# Does not produce valid JSON. See https://github.com/bazelbuild/bazel/issues/14209
build --execution_log_json_file=bazel-build-log.json
build --build_event_binary_file=bazel-bep.pb
build --bes_results_url=https://dash.zh1-idx1.dfinity.network/invocation/
build --bes_backend=bes.zh1-idx1.dfinity.network
build --bes_timeout=30s # Defauilt is no timeout.
build --bes_upload_mode=fully_async
build:ci --bes_timeout=180s # Defauilt is no timeout.
build:ci --bes_upload_mode=wait_for_upload_complete
build --remote_local_fallback
build --workspace_status_command=$(pwd)/bazel/workspace_status.sh
build --cxxopt='-std=c++17'
build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
build:clippy --output_groups=+clippy_checks
build --@rules_rust//:clippy.toml=//:clippy.toml --@rules_rust//:clippy_flags=-D,warnings,-D,clippy::all,-D,clippy::mem_forget,-A,clippy::redundant_closure,-A,clippy::too_many_arguments,-C,debug-assertions=off
build:fmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
build:fmt --output_groups=+rustfmt_checks
build --@rules_rust//:rustfmt.toml=//:rustfmt.toml
build --@rules_rust//:source_path_prefix=""
build --flag_alias=ic_version=//bazel:ic_version
build --flag_alias=ic_version_rc_only=//bazel:ic_version_rc_only
build --flag_alias=s3_endpoint=//gitlab-ci/src/artifacts:s3_endpoint
# Exclude system tests by default
# https://github.com/bazelbuild/bazel/issues/8439
build --build_tag_filters="-system_test,-upload"
test --test_tag_filters="-system_test,-post_master,-allow_to_fail"
test:alltests --test_tag_filters=""
test:paritytests --test_tag_filters="-system_test,-allow_to_fail"
test:ci --test_tag_filters="-post_master,-system_test_hourly,-system_test_nightly,-allow_to_fail"
test --test_output=errors
test --test_env=RUST_BACKTRACE=full
test:precommit --build_tests_only --test_tag_filters="smoke"
build:systest --build_tag_filters= --s3_endpoint=https://s3-upload.zh1-idx1.dfinity.network
test:systest --test_output=streamed --test_tag_filters=
# For sandboxed actions, mount an empty, writable directory at this absolute path
# (if supported by the sandboxing implementation, ignored otherwise).
test --sandbox_tmpfs_path=/tmp
test --test_timeout=-1,-1,1200,-1 # timeout in seconds for short, moderate(default), long and eternal tests. Defauilt is 60,300,900,3600. -1 is to use default.
# TODO(IDX-2374): enable alltests in CI when we will have actual system tests.
#test:ci --config=alltests
build:ci --noremote_local_fallback
build:ci --build_tag_filters="-system_test"
build:ci --remote_upload_local_results # Whether to upload locally executed action results to the remote cache.
# So that developers can build in debug mode.
build:dev --compilation_mode=fastbuild
build:macos_ci --compilation_mode=fastbuild
build:macos_ci --build_tag_filters="-system_test"
# Run `bazel build ... --config=local` if you don't have access to the buildfarm infrastructure.
build:local --remote_cache=
build:local --bes_backend=
# A config to get faster compilation feedback by skipping code generation.
# We aim to do essentially the same thing as cargo check (https://doc.rust-lang.org/cargo/commands/cargo-check.html), which is to only emit metadata(.rmeta) files.
# We do this by combining pipelined compilation and requesting only metadata files via --output_groups.
#
# pipelined_compilation=True means that we now build and depend on metadata files(`.rmeta`s)
# For more information on what pipelined compilation is, see https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199
# TODO: consider always enabling this once we've confirmed it deterministically doesn't fail
build:check --@rules_rust//rust/settings:pipelined_compilation=True
# By requesting only the output group containing the metadata files, we don't run actions that do full compilation (e.g. codegen, linking)
# and instead only run the ones that output metadata files
build:check --output_groups=build_metadata
try-import %workspace%/user.bazelrc