-
Notifications
You must be signed in to change notification settings - Fork 81
/
.bazelrc.common
156 lines (125 loc) · 9.04 KB
/
.bazelrc.common
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# See https://docs.bazel.build/versions/master/user-manual.html#bazelrc.
# Global Configuration
# --------------------
# enable common config by default (needed for renovate to ignore the file: registry)
common --config common
# Force TLS 1.2. With TLS 1.3, we run into the following error on Darwin.
# > No subject alternative DNS name matching github-releases.githubusercontent.com found.
# It looks like this is a result of SNI being broken on TLS 1.3 which results
# in us getting a certificate for githubassets.com instead.
#
# Taken from https://github.com/digital-asset/daml/pull/8697.
startup --host_jvm_args=-Djdk.tls.client.protocols=TLSv1.2
common --incompatible_require_linker_input_cc_api
common --incompatible_disallow_empty_glob=true
# test environment does not propagate locales by default some tests reads files
# written in UTF8, we need to propagate the correct environment variables, such
# as LOCALE_ARCHIVE We also need to setup an utf8 locale
test --test_env=LANG=C.UTF-8 --test_env=LOCALE_ARCHIVE
# Enable automatic OS-specific config (e.g. build:linux, build:macos, build:windows).
common --enable_platform_specific_config
# MacOS Configuration
# -------------------
# do not use Xcode on macOS
common:macos --repo_env=BAZEL_USE_CPP_ONLY_TOOLCHAIN=1
# Windows Configuration
# ---------------------
# prevent auto-detection of system compilers on Windows
common:windows --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# Platform / Toolchain Selection
# ------------------------------
build:linux-nixpkgs --config=nixpkgs
build:macos-nixpkgs --config=nixpkgs
build:nixpkgs --host_platform=@rules_nixpkgs_core//platforms:host
# Build and Test Filters
# ----------------------
# Note tag filters do not compose. If you wish to augment these filters on the
# command-line you have to repeat the full list.
build:linux-bindist --build_tag_filters -requires_nix,-requires_lz4,-requires_shellcheck,-requires_threaded_rts,-dont_test_with_bindist
build:linux-bindist --test_tag_filters -requires_nix,-requires_lz4,-requires_shellcheck,-requires_threaded_rts,-dont_test_with_bindist
build:macos-nixpkgs --build_tag_filters -dont_test_on_darwin
build:macos-nixpkgs --test_tag_filters -dont_test_on_darwin
build:macos-bindist --build_tag_filters -requires_nix,-dont_test_on_darwin,-dont_test_on_darwin_with_bindist,-requires_lz4,-requires_shellcheck,-requires_threaded_rts,-dont_test_with_bindist
build:macos-bindist --test_tag_filters -requires_nix,-dont_test_on_darwin,-dont_test_on_darwin_with_bindist,-requires_lz4,-requires_shellcheck,-requires_threaded_rts,-dont_test_with_bindist
build:windows-bindist --build_tag_filters -requires_nix,-dont_test_on_windows,-requires_lz4,-requires_shellcheck,-requires_threaded_rts,-dont_test_with_bindist
build:windows-bindist --test_tag_filters -requires_nix,-dont_test_on_windows,-requires_lz4,-requires_shellcheck,-requires_threaded_rts,-dont_test_with_bindist
# Remote Cache Configuration
# --------------------------
build:remote-cache --bes_results_url=https://app.buildbuddy.io/invocation/
build:remote-cache --bes_backend=grpcs://remote.buildbuddy.io
build:remote-cache --remote_cache=grpcs://remote.buildbuddy.io
build:remote-cache --remote_timeout=3600
# Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`.
# See https://github.com/tweag/rules_haskell/issues/1498.
build:remote-cache --keep_backend_build_event_connections_alive=false
# All clients except CI should be configured as read-only
build:remote-cache --noremote_upload_local_results
build:remote-cache --remote_timeout=3600
build:remote-cache --experimental_remote_cache_compression
build:remote-cache --experimental_remote_build_event_upload=minimal
# CI Configuration
# ----------------
common:ci --config=ci-common
build:ci --config=remote-cache
build:ci --remote_upload_local_results
common:ci-common --color=no
common:ci-common --nolegacy_important_outputs
build:ci-common --loading_phase_threads=1
build:ci-common --verbose_failures
# Make sure we don't rely on the names of convenience symlinks because those
# can be changed by user.
build:ci-common --symlink_prefix=bazel-ci-
build:ci-common --repository_cache=~/repo-cache/
build:ci-common --experimental_repository_cache_hardlinks
# Use a remote cache during CI
build:ci-windows-bindist --bes_upload_mode=wait_for_upload_complete --bes_timeout=600s
# On Github CI for Windows, we see intermittent connection failures to BuildBuddy
# (see https://github.com/buildbuddy-io/buildbuddy/issues/4467)
# increase the retries as a workaround.
build:ci-windows-bindist --experimental_build_event_upload_max_retries=256
test:ci-common --test_output=errors
build:ci-windows-bindist --config=windows-bindist
build:ci-windows-bindist-rules-haskell --config=ci-windows-bindist
build:ci-windows-bindist-rules-haskell-tests --config=ci-windows-bindist
# Windows is prone to leaking absolute paths into the remote cache which can
# poison the cache, so we do not share the cache between different modules.
# Increment these numbers to use a fresh cache.
# Errors of the following form might indicate such an issue:
#
# ERROR: D:/a/rules_haskell/rules_haskell/tests/runfiles/BUILD.bazel:20:10: Compiling tests/runfiles/main.cc failed: undeclared inclusion(s) in rule '//tests/runfiles:cc-runner':
# this rule is missing dependency declarations for the following files included by 'tests/runfiles/main.cc':
# '.../execroot/rules_haskell/external/rules_haskell_ghc_windows_amd64/mingw/include/c++/9.2.0/cstdlib'
# '.../execroot/rules_haskell/external/rules_haskell_ghc_windows_amd64/mingw/include/c++/9.2.0/x86_64-w64-mingw32/bits/c++config.h'
build:ci-windows-bindist-rules-haskell --remote_default_exec_properties=cache-silo-key=windows-rules-haskell-v0
build:ci-windows-bindist-rules-haskell-tests --remote_default_exec_properties=cache-silo-key=windows-rules-haskell-tests-v0
# XXX: @com_google_protobuf sets `use_default_shell_env = True`, so we enable
# strict action env to avoid changes in `PATH` invalidating the cache.
build:linux-bindist --experimental_strict_action_env
build:macos-bindist --experimental_strict_action_env
build:windows-bindist --experimental_strict_action_env
# Note [backward compatible options]
build:linux-bindist --incompatible_enable_cc_toolchain_resolution
build:macos-bindist --incompatible_enable_cc_toolchain_resolution
build:linux-nixpkgs --incompatible_enable_cc_toolchain_resolution
build:macos-nixpkgs --incompatible_enable_cc_toolchain_resolution
build:windows-bindist --incompatible_enable_cc_toolchain_resolution
# Blocked by https://github.com/bazelbuild/bazel/issues/11704
#build:ci --incompatible_load_cc_rules_from_bzl
# This flag will become the default in a later version of bazel
# See https://github.com/bazelbuild/bazel/issues/8922
build:ci --incompatible_load_proto_rules_from_bzl
# This flag will become the default in bazel 6
# https://github.com/tweag/rules_haskell/issues/1657
build: --incompatible_override_toolchain_transition
coverage --build_tag_filters "coverage-compatible" --test_tag_filters "coverage-compatible" --test_output=all
# To update these lines, execute
# `bazel run @contrib_rules_bazel_integration_test//tools:update_deleted_packages`
build --deleted_packages=examples,examples/arm,examples/basic_modules,examples/cat_hs,examples/cat_hs/exec/cat_hs,examples/cat_hs/lib/args,examples/cat_hs/lib/cat,examples/primitive,examples/rts,examples/transformers,examples/vector,tests/c2hs/repo,tests/haskell_module/repl/haskell_module_repl_cross_library_deps_test/package-a,tests/haskell_module/repl/haskell_module_repl_cross_library_deps_test/package-b,tests/haskell_module/repl/haskell_module_repl_test,tests/library-external-workspace/repo,tests/recompilation/recompilation_workspace,tests/repl-targets/hs_bin_repl_test,tests/repl-targets/hs_lib_repl_test,tests/stack-snapshot-deps/hs_override_stack_test,tutorial,tutorial/lib,tutorial/main,tutorial/tools/build_rules,tests/ghcWithPackages_2097/test
query --deleted_packages=examples,examples/arm,examples/basic_modules,examples/cat_hs,examples/cat_hs/exec/cat_hs,examples/cat_hs/lib/args,examples/cat_hs/lib/cat,examples/primitive,examples/rts,examples/transformers,examples/vector,tests/c2hs/repo,tests/haskell_module/repl/haskell_module_repl_cross_library_deps_test/package-a,tests/haskell_module/repl/haskell_module_repl_cross_library_deps_test/package-b,tests/haskell_module/repl/haskell_module_repl_test,tests/library-external-workspace/repo,tests/recompilation/recompilation_workspace,tests/repl-targets/hs_bin_repl_test,tests/repl-targets/hs_lib_repl_test,tests/stack-snapshot-deps/hs_override_stack_test,tutorial,tutorial/lib,tutorial/main,tutorial/tools/build_rules,tests/ghcWithPackages_2097/test
# Needed to build @rules_jvm_external//private/tools/java/com/github/bazelbuild/rules_jvm_external/zip (used by //tests/java_classpath)
build:macos-nixpkgs --tool_java_language_version=11
# Needed to run protoc compiled with libc++ / clang on Windows
build:windows-bindist --proto_compiler @rules_haskell//tests:protoc.cmd
# This flag will become the default in bazel 7
# https://github.com/bazelbuild/bazel/issues/17032
build --incompatible_disable_starlark_host_transitions