guard/.github/workflows/ci.yml
loki5512344 269daa071f
v0.3: 6-layer architecture complete
Layers:
  Layer 1: XDP/eBPF — TCP state machine, SYN throttle, blacklist, ringbuf
  Layer 2: PoW Challenge — SHA-256 hashcash, dynamic difficulty, constant-time verify
  Layer 3: Rust Core — HMAC handshake, rate limit, death code (existing)
  Layer 4: Velocity — Physics check, CAPTCHA, protocol verification
  Layer 5: Paper — Heartbeat, auto-registration (existing)
  Layer 6: Traffic Intel — EWMA, 168h profiling, reputation, alerts

Infra: XDP→Prometheus metrics, ClickHouse + Grafana dashboard, Docker Compose
Testing: 100-IP DDoS simulation, MHDDoS ref analysis, load test report
Fixes: VarInt sign extension UB, pure ACK deadlock, RST/FIN cleanup
Ref: MHDDoS, Sonar, LimboFilter, AtomGuard, Infrarust, MC-XDP-eBPF, PowGo
2026-07-21 15:47:36 +02:00

114 lines
2.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: cargo fmt --all --check
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo check --all-features
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
java-build:
name: Java — build plugins
runs-on: ubuntu-latest
defaults:
run:
working-directory: plugins
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"
cache: "gradle"
- run: ./gradlew build
- uses: actions/upload-artifact@v4
with:
name: rampart-java-plugins
path: |
plugins/velocity/build/libs/*.jar
plugins/paper/build/libs/*.jar
dashboard-build:
name: Dashboard — build
runs-on: ubuntu-latest
defaults:
run:
working-directory: dashboard
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: dashboard/package-lock.json
- run: npm ci
- run: npm run build
docker:
name: Docker — build images
runs-on: ubuntu-latest
needs: [rust-test, java-build]
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: actions/download-artifact@v4
with:
name: rampart-java-plugins
path: plugins/
- name: Build edge
uses: docker/build-push-action@v6
with:
context: .
file: deploy/docker/Dockerfile.edge
load: true
tags: rampart/edge:ci
- name: Build velocity
uses: docker/build-push-action@v6
with:
context: .
file: deploy/docker/Dockerfile.velocity
load: true
tags: rampart/velocity:ci
- name: Build paper
uses: docker/build-push-action@v6
with:
context: .
file: deploy/docker/Dockerfile.paper
load: true
tags: rampart/paper:ci