Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ jobs:
- name: Prove no library crate installs a process-global
run: make check-no-globals

# Connector allocation counts
bench-gate:
name: Bench Gate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v2
with:
rustflags: ""

- name: Assert connector allocations per message
run: make bench-gate

# Embedded target testing
embedded-targets:
name: Embedded Cross-compilation
Expand Down Expand Up @@ -149,7 +166,7 @@ jobs:
comprehensive-check:
name: Comprehensive Development Check
runs-on: ubuntu-latest
needs: [format-and-lint, makefile-build, embedded-targets]
needs: [format-and-lint, makefile-build, embedded-targets, bench-gate]
steps:
- uses: actions/checkout@v7
with:
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AimDB Makefile
# Simple automation for common development tasks

.PHONY: help build test clean clean-embedded fmt fmt-check clippy doc all check test-embedded test-wasm wasm wasm-test wasm-test-deps examples deny audit security publish publish-check readme-check codegen-drift check-no-sim check-no-globals check-toolchain-pin
.PHONY: help build test clean clean-embedded fmt fmt-check clippy doc all check test-embedded test-wasm wasm wasm-test wasm-test-deps examples deny audit security publish publish-check readme-check codegen-drift check-no-sim check-no-globals check-toolchain-pin bench-gate
.DEFAULT_GOAL := help

# Separate target dir for embedded checks so an interrupted example build
Expand Down Expand Up @@ -56,6 +56,7 @@ help:
@printf " test-wasm Test WASM cross-compilation compatibility\n"
@printf " readme-check Verify the README quickstart matches its compiled example\n"
@printf " codegen-drift Compile codegen output against the workspace API\n"
@printf " bench-gate Assert connector allocation counts (b0_alloc_connector)\n"
@printf "\n"
@printf " $(YELLOW)Security & Quality:$(NC)\n"
@printf " deny Check dependencies (licenses, advisories, bans)\n"
Expand Down Expand Up @@ -742,6 +743,14 @@ publish:
@printf "$(GREEN)✓ All $(words $(PUBLISH_ORDER)) crates published successfully!$(NC)\n"
@printf "$(BLUE)🎉 AimDB v$(shell grep '^version' Cargo.toml | head -1 | cut -d '"' -f 2) is now live on crates.io!$(NC)\n"

## Benchmark gates
# Runs the counting-allocator connector bench, which asserts its EXPECTED
# allocations per message and fails on any difference.
# Deterministic, so it gates CI without a quiet runner.
bench-gate:
@printf "$(GREEN)Checking connector allocation counts...$(NC)\n"
cargo bench --package aimdb-bench --bench b0_alloc_connector

## Drift guards
# The README quickstart is compiled as examples/readme-quickstart; this target
# fails when the README code block and the example diverge, or when the
Expand Down
Loading