Add deterministic feed fault laboratory (#3) #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Restore | |
| run: dotnet restore MarketDataSimulator.sln | |
| - name: Build | |
| run: dotnet build MarketDataSimulator.sln -c Release --no-restore | |
| - name: Verify committed market data | |
| run: sha256sum --check data/sample/SHA256SUMS | |
| - name: Test | |
| run: dotnet test Tests/Tests.csproj -c Release --no-build --no-restore --verbosity normal | |
| - name: Matching engine micro-benchmark (smoke) | |
| run: dotnet run --project Bench/Bench.csproj -c Release --no-build -- matching --sizes 1000 | |
| - name: Order book micro-benchmark (smoke) | |
| # Not a performance gate - CI runners are far too noisy for that. This only proves the | |
| # benchmark still builds and runs, so it cannot rot between measurement sessions. | |
| run: dotnet run --project Bench/Bench.csproj -c Release --no-build -- books --depths 10 | |
| - name: Protocol benchmark (smoke) | |
| run: dotnet run --project Bench/Bench.csproj -c Release --no-build -- protocol --iterations 10000 --trials 3 | |
| - name: Durability benchmark (smoke) | |
| run: dotnet run --project Bench/Bench.csproj -c Release --no-build -- durability --records 100 --payload 64 --trials 3 --range-queries 10 | |
| - name: Feed smoke test | |
| run: ./scripts/smoke.sh | |
| - name: Documentation matches the recorded measurements | |
| # The tables in README.md and BENCHMARKS.md are generated from | |
| # bench/results/*.json. This fails if any of them has been edited by hand | |
| # or left behind by a re-measurement, which is how a published figure came | |
| # to disagree with its own results file by a factor of six. | |
| run: python3 bench/docgen.py --check | |
| - name: Vectorized book agrees with the reference on every hardware path | |
| # The AVX-512, AVX2 and scalar lower-bound paths are selected at JIT time, | |
| # so one process only ever exercises one of them. Disabling the intrinsics | |
| # forces the others through the same differential comparison. | |
| run: | | |
| for disable in DOTNET_EnableAVX512F DOTNET_EnableAVX2 DOTNET_EnableHWIntrinsic; do | |
| echo "=== $disable=0 ===" | |
| env "$disable=0" dotnet test Tests/Tests.csproj -c Release --no-build \ | |
| --filter "FullyQualifiedName~BookDepthTests|FullyQualifiedName~OrderBookTests" | |
| done |