guard/.github/workflows/ci.yml
loki5512344 15f474486a
feat!: universal redesign — drop Minecraft stack, single-crate architecture
- remove Java plugins (velocity/paper), dashboard, all MC-specific code
  (handshake, death_code, varint, hostname-HMAC); available in history pre-v0.2
- merge crates/* into one package with src/bin/{rampart,rampart-manager,rampart-cli}
- ProtocolHandler trait + registry (no implementations yet), universal PoW kept
- XDP: universal L3/L4 filter (xdp/core/) + pluggable hook API (xdp/hooks/),
  fix IPv6 saddr bug; clang build verified
- docs: bilingual knowledge base (docs/kb/: attacks x4, defense-levels,
  practice x3), rewrite README/architecture for universal concept
- TODO.md v4.0: <=300-line module limit, competitor benchmark section (ref/)
- deploy/CI/docs cleanup: no MC references, new binary names

cargo build/clippy(-D warnings)/test green (55 tests)
2026-08-24 01:50:22 +02:00

67 lines
1.8 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-latest
steps:
- uses: actions/checkout@v4
- 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
- name: XDP — build binaries
run: cargo build --features xdp --bins
- name: XDP — smoke-check BPF compilation (clang)
run: |
mkdir -p target/xdp
clang -O2 -g -target bpf -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-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test
rust-deny:
name: Rust — cargo-deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check
docker:
name: Docker — build edge image
runs-on: ubuntu-latest
needs: [rust-test]
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Build edge
uses: docker/build-push-action@v6
with:
context: .
file: deploy/docker/Dockerfile.edge
load: true
tags: rampart/edge:ci