Files
Baradb/.github/workflows/ci.yml
T
dimgigov 19d0ff7366 feat(verify): expand formal verification to 7 specs, add versioning, CI integration
Added 3 new TLA+ specs:
- gossip.tla — SWIM gossip membership & failure detection
- deadlock.tla — wait-for graph deadlock detection
- sharding.tla — consistent hashing shard assignment

Improved existing 4 specs:
- raft.tla: added CommittedIndexValid invariant
- twopc.tla: added CoordinatorConsistency, NoDecideWithoutConsensus,
  ParticipantStateValid; increased to MaxTxnId=3
- mvcc.tla: added CommittedMustStart, CommittedVersionsUnique
- replication.tla: added AppliedLteCurrent, SemiSyncQuorum

Infrastructure:
- VERSION file (1.0.0)
- CHANGELOG.md
- ANALYSIS.md (weak spots & improvement plan)
- run_all.sh script for batch TLC verification
- CI verify job in GitHub Actions
- Updated README with new specs and properties

Total: 7 specs, 26 invariants, 11.6M states checked, 0 errors
2026-05-07 18:26:55 +03:00

61 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Nim
uses: jiro4989/setup-nim-action@v1
with:
nim-version: '2.2.10'
- name: Install system dependencies
run: sudo apt-get update -qq && sudo apt-get install -y -qq libssl-dev libpcre3-dev
- name: Install Nim dependencies
run: nimble install --depsOnly -y
- name: Run tests
run: nim c -d:ssl --path:src -r tests/test_all.nim
- name: Compile benchmarks
run: nim c -d:release benchmarks/bench_all.nim
- name: Compile stress test
run: nim c -d:ssl --threads:on --path:src tests/stress_test.nim
- name: Run stress test
run: ./tests/stress_test
- name: Check for unused declarations and imports
run: |
nim c -d:ssl --path:src tests/test_all.nim 2>&1 | tee build.log || true
echo "--- Checking for XDeclaredButNotUsed hints ---"
grep -E "XDeclaredButNotUsed|UnusedImport" build.log | while read -r line; do
echo "::warning::$line"
done
echo "--- Done ---"
verify:
runs-on: ubuntu-latest
container:
image: eclipse-temurin:21-jre
steps:
- uses: actions/checkout@v4
- name: Run TLA+ model checker on all specs
run: |
cd formal-verification
for spec in raft twopc mvcc replication gossip deadlock sharding; do
echo "=== Verifying ${spec}.tla ==="
java -cp tla2tools.jar tlc2.TLC -config models/${spec}.cfg ${spec}.tla
done