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
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: ci

on:
push:
branches: [main, master]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Mako (if available as release binary)
run: |
set -euo pipefail
if command -v mako >/dev/null 2>&1; then
mako version
exit 0
fi
echo "Mako not in PATH — installing via cargo if rust present, else skip compile tests"
if command -v cargo >/dev/null 2>&1; then
cargo install --git https://github.com/loreste/mako mako --locked || true
fi
if ! command -v mako >/dev/null 2>&1; then
echo "SKIP_MAKO=1" >> "$GITHUB_ENV"
fi

- name: Unit tests
if: env.SKIP_MAKO != '1'
run: make test

- name: Build
if: env.SKIP_MAKO != '1'
run: make build

- name: Linux deploy assets
run: make test-linux-assets

- name: HA package assets
run: |
test -f deploy/ha/README.md
test -f deploy/ha/keepalived.conf.example
test -f deploy/ha/docker-compose.ha.yml
test -f deploy/ha/leba-healthcheck.sh

- name: Soak harness
if: env.SKIP_MAKO != '1'
run: make test-soak

- name: Docs presence
run: |
test -f docs/PRODUCTION.md
test -f docs/LIMITS.md
test -f docs/ROADMAP.md
105 changes: 105 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: release

on:
push:
tags:
- "v*"

permissions:
contents: write
packages: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Detect version
id: ver
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"

- name: Install Mako
run: |
set -euo pipefail
if command -v mako >/dev/null 2>&1; then mako version; exit 0; fi
if command -v cargo >/dev/null 2>&1; then
cargo install --git https://github.com/loreste/mako mako --locked
fi
command -v mako

- name: Build binary
run: |
make build
mkdir -p dist
cp leba "dist/leba-linux-amd64"
chmod +x "dist/leba-linux-amd64"

- name: Checksums
run: |
cd dist
sha256sum leba-linux-amd64 > SHA256SUMS
cat SHA256SUMS

- name: SBOM (CycloneDX-ish minimal)
run: |
VERSION="${{ steps.ver.outputs.version }}"
cat > dist/sbom.cdx.json <<EOF
{
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"version": 1,
"metadata": {
"component": {
"type": "application",
"name": "leba",
"version": "${VERSION}",
"purl": "pkg:generic/leba@${VERSION}"
}
},
"components": [
{
"type": "library",
"name": "mako",
"description": "Language/runtime used to build Leba"
}
]
}
EOF

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/leba-linux-amd64
dist/SHA256SUMS
dist/sbom.cdx.json
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Buildx
uses: docker/setup-buildx-action@v3

- name: Login GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push multi-arch image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository }}:${{ steps.ver.outputs.version }}
ghcr.io/${{ github.repository }}:latest
build-args: |
TARGETARCH=amd64
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MAKO ?= $(shell if [ -x /Users/loreste/mako/target/release/mako ]; then echo /Us
# Prefer in-tree quiche so HTTP/3 links when the third_party FFI build exists.
export MAKO_QUICHE_ROOT ?= $(shell if [ -f /Users/loreste/mako/runtime/third_party/quiche/target/release/libquiche.a ]; then echo /Users/loreste/mako/runtime/third_party/quiche; fi)

.PHONY: all build test check doctor doctor-linux explain smoke run clean test-linux-assets test-haproxy-compare
.PHONY: all build test check doctor doctor-linux explain smoke run clean test-linux-assets test-haproxy-compare test-soak test-concurrent test-adversarial

all: build

Expand Down Expand Up @@ -38,6 +38,11 @@ test-concurrent: build
chmod +x scripts/concurrent_smoke.sh
./scripts/concurrent_smoke.sh 200

# Connection budget, keep-alive, body limit, reload under load (0.14 platform quality).
test-soak: build
chmod +x scripts/soak.sh
./scripts/soak.sh 200 6

test-haproxy-compare: build
chmod +x scripts/haproxy_compare.sh
./scripts/haproxy_compare.sh
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Typical paths:

## Status

Leba is working software with 80+ automated tests (v0.12.0). It handles
Leba is working software with 80+ automated tests (v0.14.0). It handles
HTTP/1-3, TCP, UDP/SIP, WebSocket, TLS/mTLS, and has been deployed behind
real traffic. v0.11 ships an NPM-style control plane (proxy hosts, certificates
via lego, access lists) on a HAProxy-class data plane.
Expand Down
Loading
Loading