$ account bazelbuild
Bazel is a multi-language, hermetic build system developed primarily by Google. The codebase serves as both the build tool itself (a C++ client communicating with a Java server) and the infrastructure for writing build rules in Starlark, a Python-like DSL. It implements a unique incremental build engine (Skyframe) that caches all intermediate states for correctness and speed, and supports remote caching and execution. The repository contains the full stack: command-line option parsing, Starlark interpreter and compiler, process sandboxing and wrapping, test runners (JUnit4 with coverage), jar merging, and platform-specific native code for Linux, macOS, and Windows. The architecture is split into a thin C++ client (handling startup, workspace discovery, and communication with the server) and a heavy Java server that performs all build analysis and execution. Key modules include the Starlark runtime (net.starlark.java.eval) which is an embeddable dynamic language with type checking, and the options framework (com.google.devtools.common.options) which provides annotation-driven, extensible command-line parsing. The repository is self-hosting: builds of Bazel are built with Bazel itself, using a bootstrap script. It maintains an extensive test suite across shell, Java, C++, and Python, and has active CI pipelines for multiple platforms and configurations.
This repository is the operational backbone for Bazel's continuous integration system. It orchestrates Buildkite pipelines for hundreds of Bazel projects (including Bazel itself, rules repositories, and downstream projects like TensorFlow), manages cloud infrastructure on Google Cloud Platform (GCE, GCR, Cloud SQL, BigQuery), and provides a suite of tools for release management, cherry-picking, metrics collection, and a monitoring dashboard. The architecture is polyglot: a Rust agent uploads test artifacts from Build Event Protocol files, a Go service collects and publishes pipeline performance metrics, a Spring Boot backend with a Next.js frontend serves a dashboard for tracking GitHub issues and build stats, and Python scripts (primarily `bazelci.py`) handle dynamic pipeline generation and CI orchestration. Infrastructure is managed via Terraform, with GitHub Actions for automated PR review of the Bazel Central Registry and release workflows. The codebase is actively maintained but shows signs of technical drift, including hardcoded versions, references to end-of-life platforms, and a large number of manually defined pipelines that risk configuration drift.
This repository provides the Bazel build rules and tooling for building Android applications (APKs, AABs, libraries) using Bazel. It includes Starlark rules for android_binary, android_library, android_local_test, etc., along with a suite of Go and Java tools for resource processing, dexing, R8 optimization, manifest merging, and mobile-install deployment. The codebase is production-grade, used internally at Google, and supports both WORKSPACE and Bzlmod. It features a well-architected processing pipeline pattern, a reusable flag system, and extensive test infrastructure. The repository is actively maintained with regular commits and CI, though it carries some technical debt from internal migration and legacy feature flags.