Skip to content

fix: post-merge P2 findings — EINTR-safe threadSleep, runtime.deinit ownership #125

fix: post-merge P2 findings — EINTR-safe threadSleep, runtime.deinit ownership

fix: post-merge P2 findings — EINTR-safe threadSleep, runtime.deinit ownership #125

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build & Test
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Zig 0.16
uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Build (Debug)
run: zig build
- name: Build (ReleaseFast)
run: zig build -Doptimize=ReleaseFast
- name: Verify binary runs
run: ./zig-out/bin/turbodb --help
- name: Verify shared library exports
run: |
if [ "$RUNNER_OS" = "macOS" ]; then
nm -gU zig-out/lib/libturbodb.dylib | grep turbodb_
else
nm -D zig-out/lib/libturbodb.so | grep turbodb_
fi
- name: Run core tests
run: zig build test 2>&1 || true
- name: Run all subsystem tests
run: zig build test-all 2>&1 || true
python-test:
name: Python FFI Test
needs: build
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Zig 0.16
uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Build shared library
run: zig build
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run Python smoke test
run: python3 python/test.py
benchmark:
name: Benchmark
needs: build
runs-on: macos-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install Zig 0.16
uses: mlugg/setup-zig@v2
with:
version: 0.16.0
- name: Build (ReleaseFast)
run: zig build -Doptimize=ReleaseFast
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run search recall smoke test
timeout-minutes: 2
run: |
zig build
PYTHONPATH=python python3 bench/recall_smoke.py
- name: Run benchmark (TurboDB HTTP server)
timeout-minutes: 3
continue-on-error: true
run: |
python3 bench/bench.py --turbodb-only --docs 2000 --threads 4 --workloads insert --binary ./zig-out/bin/turbodb --csv bench_results.csv || true
- name: Run regression benchmark (all subsystems)
timeout-minutes: 5
continue-on-error: true
run: |
zig build bench-regression 2>&1 | tee regression_results.txt || true
- name: Run partition scaling benchmark
timeout-minutes: 5
continue-on-error: true
run: |
zig build bench-partition 2>&1 | tee partition_results.txt || true
- name: Upload benchmark results
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: |
bench_results.csv
regression_results.txt
partition_results.txt