d562e53b83
- Extracted audio capture and playback implementations, along with the WebRTC peer engine, from `pi-natives` into a new `pi-voice` library crate. - Updated `pi-natives` bindings to consume the extracted `pi_voice` audio streams and live peer core. - Added release validation gate jobs, parallelized Linux binary builds, and introduced a concurrent macOS release build job in the CI workflow. - Updated Bazel workspace configurations, Cargo manifests, and documentation to include the new `pi-voice` crate and its dependencies.
73 lines
3.4 KiB
Plaintext
73 lines
3.4 KiB
Plaintext
# Bazel build configuration for the pi-natives NAPI addon pipeline.
|
|
# Cross targets, ISA variants, and release codegen are encoded in the
|
|
# //:natives-* addon targets (bazel/defs.bzl transition), so a bare
|
|
# `bazel build //:natives-<target>` is always release-grade.
|
|
|
|
common --enable_platform_specific_config
|
|
|
|
# Hermetic-ish action env: no host env leaks into action keys. Build scripts
|
|
# that need host tools (cmake for audiopus_sys' bundled opus) get an explicit
|
|
# PATH through crate annotations in MODULE.bazel.
|
|
build --incompatible_strict_action_env
|
|
|
|
# NOTE: rust pipelined_compilation stays OFF: handing dependents rmeta-only
|
|
# crates breaks `rust_test(crate = ...)` harness compiles whose deps export
|
|
# macro_rules! ("can't find crate" at macro expansion).
|
|
|
|
# Keep rustc errors readable.
|
|
build --@rules_rust//rust/settings:error_format=human
|
|
# Generated toolchains carry target_settings requiring the nightly channel.
|
|
build --@rules_rust//rust/toolchain/channel=nightly
|
|
|
|
|
|
# --- Rust validation (replaces cargo clippy/nextest in CI) --------------------
|
|
# Mirrors cargo semantics: crates with `[lints] workspace = true` (pi-ast,
|
|
# pi-iso, pi-natives, pi-shell, pi-voice, pi-walker) get the strict workspace
|
|
# policy
|
|
# (clippy-strict; bazel/clippy.bazelrc is generated from Cargo.toml); everything
|
|
# else gets default clippy + -Dwarnings (clippy).
|
|
build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
|
|
build:clippy --output_groups=+clippy_checks
|
|
build:clippy --@rules_rust//rust/settings:clippy_flag=-Dwarnings
|
|
build:clippy-strict --config=clippy
|
|
import %workspace%/bazel/clippy.bazelrc
|
|
# rustfmt check via aspect, against the workspace rustfmt.toml.
|
|
build:rustfmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
|
|
build:rustfmt --output_groups=+rustfmt_checks
|
|
build:rustfmt --@rules_rust//rust/settings:rustfmt.toml=//:rustfmt.toml
|
|
test --test_output=errors
|
|
test --test_summary=terse
|
|
|
|
# --- CI base -----------------------------------------------------------------
|
|
build:ci --curses=no --color=yes --show_timestamps
|
|
build:ci --announce_rc
|
|
build:ci --verbose_failures
|
|
# Fail-fast inside one invocation; job-level matrix provides isolation.
|
|
build:ci --keep_going=false
|
|
# Reuse sandbox trees between actions: the zig/xwin toolchains stage ~10k-file
|
|
# input trees per action, and rebuilding+async-deleting them for thousands of
|
|
# actions exhausts file descriptors on the kata pods (EMFILE in unix_jni).
|
|
build:ci --reuse_sandbox_directories
|
|
|
|
# --- Remote cache ------------------------------------------------------------
|
|
# The bazel-remote endpoint is cluster-internal only; .github/actions/bazel-cache
|
|
# composes endpoint + credentials into an rc fragment on omp-kata pods.
|
|
# GitHub-hosted runners never use a remote cache (actions/cache-backed
|
|
# --disk_cache instead). These configs carry only the policy bits.
|
|
#
|
|
# cache-rw: trusted in-cluster writers (omp-kata pods).
|
|
build:cache-rw --remote_upload_local_results=true
|
|
build:cache-rw --remote_local_fallback
|
|
# cache-ro: read-only consumers (e.g. local dev via .bazelrc.user + VPN/tailnet).
|
|
build:cache-ro --remote_upload_local_results=false
|
|
build:cache-ro --remote_local_fallback
|
|
# Don't let a cache outage fail the build.
|
|
build:cache-rw --remote_retries=2
|
|
build:cache-ro --remote_retries=2
|
|
build:cache-rw --remote_timeout=60s
|
|
build:cache-ro --remote_timeout=60s
|
|
|
|
# --- Local development ---------------------------------------------------------
|
|
# Optional user overrides (remote cache endpoint, disk cache, etc.).
|
|
try-import %workspace%/.bazelrc.user
|