Skip to content

adjust price level count to 100 in bench to avoid bad alloc as github… #35

adjust price level count to 100 in bench to avoid bad alloc as github…

adjust price level count to 100 in bench to avoid bad alloc as github… #35

Workflow file for this run

name: Raijin-LOB Engine CI
on:
push:
branches: ["main", "master"]
paths:
- 'src/**'
- 'include/**'
- 'tests/**'
- 'benchmarks/**'
- 'CMakeLists.txt'
- 'third_party/**'
- '.github/workflows/ci.yaml'
- '**.cpp'
- '**.hpp'
pull_request:
branches: ["main", "master"]
paths:
- 'src/**'
- 'include/**'
- 'tests/**'
- 'benchmarks/**'
- 'CMakeLists.txt'
- 'third_party/**'
- '.github/workflows/ci.yaml'
- '**.cpp'
- '**.hpp'
permissions:
contents: read
jobs:
build-and-test:
name: Build and Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: 'recursive'
- name: Install depedencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake clang-tidy clang-format
#- name: Run Clang-Format Check
# run: |
# find src include tests -name "*.cpp" -o -name "*.hpp" | xargs clang-format --dry-run --Werror
#- name: Run Clang-Tidy (Linter)
# run: |
# # Run the linter on all our source files
# clang-tidy src/core/*.cpp include/core/*.hpp -- -Iinclude -Ithird_party/json/include -std=c++20
- name: Configure CMake
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cd build
make -j$(nproc)
- name: Run tests
run: |
cd build
ctest --output-on-failure
run-benchmarks:
name: Performance Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake
- name: Configure and Build
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc) raijin_benchmarks
- name: Run Benchmarks and Report to Summary
run: |
cd build
echo "## Raijin-LOB Performance Benchmarks" >> $GITHUB_STEP_SUMMARY
echo "### Microbench (Deterministic Data)" >> $GITHUB_STEP_SUMMARY
echo '```text' >> $GITHUB_STEP_SUMMARY
./raijin_benchmarks >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY