/
.bazelrc
90 lines (73 loc) · 4.34 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
# See https://docs.bazel.build/versions/master/user-manual.html#bazelrc.
# Global Configuration
# --------------------
# 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
# 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
# Platform / Toolchain Selection
# ------------------------------
build:linux-nixpkgs --config=nixpkgs
build:macos-nixpkgs --config=nixpkgs
build:nixpkgs --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host
# Use this configuration when targeting Windows. Eventually this will
# no longer be required:
# https://bazel.build/roadmaps/platforms.html#replace---cpu-and---host_cpu-flags.
build:windows-bindist --crosstool_top=@rules_haskell_ghc_windows_amd64//:cc_toolchain
# 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
# CI Configuration
# ----------------
common:ci --color=no
build:ci --loading_phase_threads=1
build:ci --verbose_failures
# Make sure we don't rely on the names of convenience symlinks because those
# can be changed by user.
build:ci --symlink_prefix=bazel-ci-
build:ci --repository_cache=~/repo-cache/
build:ci --experimental_repository_cache_hardlinks
# Use a remote cache during CI
build:ci --bes_results_url=https://app.buildbuddy.io/invocation/
build:ci --bes_backend=grpcs://cloud.buildbuddy.io
build:ci --remote_cache=grpcs://cloud.buildbuddy.io
build:ci --remote_timeout=3600
test:ci --test_output=errors
# 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
# Windows still uses --crosstool_top.
#build:ci-windows-bindist --incompatible_enable_cc_toolchain_resolution
# Blocked by https://github.com/bazelbuild/bazel/issues/11704
#build:ci --incompatible_load_cc_rules_from_bzl
# Blocked by https://github.com/bazelbuild/buildtools/issues/757
#build:ci --incompatible_load_proto_rules_from_bzl
build:ci --incompatible_load_python_rules_from_bzl
coverage --build_tag_filters "coverage-compatible" --test_tag_filters "coverage-compatible" --test_output=all
# User Configuration
# ------------------
try-import %workspace%/.bazelrc.local