Repository navigation
Expand file tree
/
Copy pathci.bazelrc
More file actions
83 lines (76 loc) · 4.68 KB
/
Copy pathci.bazelrc
File metadata and controls
83 lines (76 loc) · 4.68 KB
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
# Copyright 2022 The NativeLink Authors. All rights reserved.
#
# Licensed under the Functional Source License, Version 1.1, Apache 2.0 Future License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# See LICENSE file for details
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NativeLink Cloud configuration for this repository's own CI. Everything here
# is opt-in via --config; plain local builds are unaffected. CI activates these
# groups through a generated user.bazelrc (see
# .github/actions/setup-nativelink-cloud), which injects the claim endpoints
# and the --remote_header/--bes_header credentials from repository secrets —
# neither endpoints nor secrets belong in this file.
# --- Behavior groups (endpoint-free) ---
# Remote cache + BES for lanes that still execute locally. Safe on any host.
common:nl-cache --remote_timeout=600
common:nl-cache --remote_retries=5
# Emit the optional BEP records that are most useful for invocation and target
# inspection. These flags are shared by the Bazel 8 and Bazel 9 CI lanes.
common:nl-cache --build_event_publish_all_actions
common:nl-cache --experimental_bep_target_summary
common:nl-cache --experimental_build_event_expand_filesets
common:nl-cache --experimental_run_bep_event_include_residue
common:nl-cache --bes_lifecycle_events
# CI must not report success before the backend has acknowledged the complete
# stream. `fully_async` may lose events, leave streams incomplete, and omit the
# final lifecycle events when a runner exits or an upload transiently fails.
common:nl-cache --bes_upload_mode=wait_for_upload_complete
common:nl-cache --build_event_upload_max_retries=8
# Main-branch mode: populate the shared cache. Only TraceMachina main-branch
# identities may hold a write-capable key; PR lanes instead get a plain
# --remote_upload_local_results=false line from the setup action.
common:nl-write --remote_upload_local_results=true
common:nl-write --remote_cache_async
# Hermetic toolchain identity. These are the inputs that determine every C++
# and Rust compile action's cache key: the zero-sysroot hermetic LLVM platform
# and the downloaded Rust toolchains. They are keyed on downloaded toolchain
# CONTENT, not on any host path, so a build that pins them produces identical
# action digests regardless of whether it runs on a bare runner, inside a
# `nix develop` shell (whose default toolchain otherwise bakes /nix/store/<hash>
# paths into the action key), or on a remote worker. Pinning this group is what
# lets a cache WRITER and a cache READER agree on digests for identical source.
# It needs no endpoint and is safe on any x86_64 Linux host; macOS lanes must
# not apply it (lre.bazelrc auto-applies conflicting LRE platforms there, which
# the setup action already guards against for the remote path).
common:nl-toolchain --platforms=@llvm//platforms:linux_x86_64_gnu.2.28
common:nl-toolchain --host_platform=@llvm//platforms:linux_x86_64_gnu.2.28
common:nl-toolchain --extra_execution_platforms=@llvm//platforms:linux_x86_64_gnu.2.28
common:nl-toolchain --extra_toolchains=@rust_toolchains//:all
# The default musl interpreter is dynamically linked against the musl loader,
# which glibc-only worker images lack (genrule tools exit 127).
common:nl-toolchain --@rules_python//python/config_settings:py_linux_libc=glibc
# Remote execution. Mirrors the staging-rbe config proven from a developer
# machine: hermetic LLVM plus downloaded Rust toolchains, so workers need no
# GCC/Rust/Nix. Combine only with an *-exec endpoint group, and only on
# x86_64 Linux hosts — macOS auto-applies conflicting LRE platforms from
# lre.bazelrc, which the setup action guards against. nl-rbe inherits the
# hermetic toolchain identity so remote-executed and locally-executed
# cache-keyed actions share one digest space.
common:nl-rbe --config=nl-toolchain
common:nl-rbe --jobs=200
# --remote_download_toplevel (not minimal): keep intermediate output trees on
# the client so a CAS eviction mid-build is recoverable (the client can
# re-upload) instead of a fatal FAILED_PRECONDITION "not found in fast or slow
# store". Minimal keeps intermediates remote-only, which made eviction fatal.
common:nl-rbe --remote_download_toplevel
common:nl-rbe --remote_retries=8
common:nl-rbe --experimental_remote_cache_eviction_retries=5
# Endpoints deliberately do not appear in this file: the setup action derives
# them from the claim-base repository secret at job time.