- Split TODO into a thin status index plus docs/roadmap/ with one file per task (v0.4 reliability, v0.5 product, v0.6 research, icebox). - Add docs/architecture.md (current processes, packet/data path, layers, storage, metrics) and docs/development.md (rules, gates, DoD). - Add CHANGELOG.md reconstructed from history; move round details out of TODO. - Align docs with the code: config defaults and missing [detect]/ [protocol.http] sections, XDP metric names, ClickHouse table and TTL, Redis RDB restore, multiarch clang include, CLI binary name. - Add scripts/check_docs_links.sh and run it in CI. - release profile: thin LTO + one codegen unit. Binary 12.3 MB -> 9.7 MB, http parser bench 314 ns -> 278 ns; panic=abort stays off for catch_unwind in the Redis subscriber. - Drop the unused JWT role claim; fix 'rampart doctor' hints in the CLI.
98 lines
3.3 KiB
YAML
98 lines
3.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: -D warnings
|
|
|
|
jobs:
|
|
rust-check:
|
|
name: Rust — check & clippy
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: sudo apt-get update && sudo apt-get install -y libelf-dev libbpf-dev clang linux-libc-dev
|
|
- run: cargo fmt --all --check
|
|
- run: cargo clippy --all-targets --all-features -- -D warnings
|
|
- run: cargo check --all-features
|
|
- run: cargo check --no-default-features --all-targets
|
|
- name: XDP — build binaries
|
|
run: cargo build --features xdp --bins
|
|
- name: XDP — smoke-check BPF compilation (clang)
|
|
run: |
|
|
mkdir -p target/xdp
|
|
# clang with `-target bpf` does not search the glibc multiarch directory,
|
|
# so the asm/types.h pulled in by linux/types.h needs an explicit -I.
|
|
clang -O2 -g -target bpf -I"/usr/include/$(gcc -print-multiarch)" \
|
|
-c xdp/core/universal_filter.c -o target/xdp/universal_filter.o
|
|
test -f target/xdp/universal_filter.o
|
|
|
|
rust-test:
|
|
name: Rust — test
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
# libbpf-sys builds a vendored libbpf (needs libelf/zlib), and build.rs
|
|
# compiles the XDP program with clang (needs libbpf-dev/linux-libc-dev).
|
|
- run: sudo apt-get update && sudo apt-get install -y libelf-dev zlib1g-dev libbpf-dev clang linux-libc-dev
|
|
- run: cargo test --all-features
|
|
|
|
rust-test-no-default-features:
|
|
name: Rust — test (no default features, protocol-http)
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: sudo apt-get update && sudo apt-get install -y libelf-dev zlib1g-dev libbpf-dev clang linux-libc-dev
|
|
# Feature-gated code must actually run: without this job the
|
|
# `--no-default-features` combination is only type-checked, never tested.
|
|
- run: cargo test --no-default-features --features protocol-http
|
|
|
|
repo-gates:
|
|
name: Repo — module size & default secrets
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Module size gate
|
|
run: bash scripts/check_module_size.sh
|
|
- name: Default secrets gate
|
|
run: bash scripts/check_default_secrets.sh
|
|
- name: Documentation links gate
|
|
run: bash scripts/check_docs_links.sh
|
|
|
|
rust-deny:
|
|
name: Rust — cargo-deny
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: EmbarkStudios/cargo-deny-action@v2
|
|
with:
|
|
command: check
|
|
|
|
docker:
|
|
name: Docker — build edge image
|
|
runs-on: ubuntu-24.04
|
|
needs: [rust-test]
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: docker/setup-buildx-action@v4
|
|
- name: Build edge
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
context: .
|
|
file: deploy/docker/Dockerfile.edge
|
|
load: true
|
|
tags: rampart/edge:ci
|