Skip to content

Merge pull request #40 from justrach/issue-32-33-39-cow-replication-m… #40

Merge pull request #40 from justrach/issue-32-33-39-cow-replication-m…

Merge pull request #40 from justrach/issue-32-33-39-cow-replication-m… #40

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.15
uses: mlugg/setup-zig@v2
with:
version: 0.15.2
- 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.15
uses: mlugg/setup-zig@v2
with:
version: 0.15.2
- 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.15
uses: mlugg/setup-zig@v2
with:
version: 0.15.2
- name: Build (ReleaseFast)
run: zig build -Doptimize=ReleaseFast
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run benchmark (TurboDB only)
timeout-minutes: 3
run: |
python3 bench/bench.py --turbodb-only --docs 2000 --threads 4 --workloads insert,get,update --binary ./zig-out/bin/turbodb --csv bench_results.csv
- name: Run regression benchmark (all subsystems)
timeout-minutes: 5
run: |
zig build bench-regression 2>&1 | tee regression_results.txt
- name: Run partition scaling benchmark
timeout-minutes: 5
run: |
zig build bench-partition 2>&1 | tee partition_results.txt
- 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