Merge pull request #3 from openSVM/copilot/fix-6b375de1-e7b7-461a-ac9… #15
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: bench | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| pull_request: {} | |
| jobs: | |
| smoke: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build and test (Rust) | |
| run: | | |
| cargo build -p bmssp | |
| cargo test -p bmssp --all-features -- --nocapture | |
| - name: Install deps (all languages) | |
| run: | | |
| bash scripts/install_deps.sh --yes || true | |
| python3 -m pip install --user -r bench/requirements.txt || true | |
| - name: Quick smoke | |
| run: | | |
| python3 bench/runner.py --quick --smoke --timeout-seconds 20 --out results-dev | |
| - name: Upload smoke results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: results-dev | |
| path: | | |
| results-dev | |
| rust-bench: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Cargo test (unit) | |
| run: | | |
| cargo test -p bmssp --verbose | |
| - name: Install all deps (Linux) | |
| run: | | |
| bash scripts/install_deps.sh --yes | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run bench runner (release) | |
| run: | | |
| python3 -m pip install --user -r bench/requirements.txt || true | |
| python3 bench/runner.py --release --jobs 2 --timeout-seconds 120 --out results | |
| - name: Upload results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: results | |
| path: results | |
| big-bench-1000x: | |
| # manual trigger only to avoid heavy CI on every push | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install all deps | |
| run: | | |
| bash scripts/install_deps.sh --yes | |
| python3 -m pip install --user -r bench/requirements.txt || true | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run 1000x bench | |
| run: | | |
| python3 bench/runner.py --params bench/params_1000x.yaml --release --jobs 4 --timeout-seconds 1800 --out results-1000x | |
| - name: Generate plots | |
| run: | | |
| python3 bench/plots.py results-1000x/agg-*\.csv --out results-1000x || true | |
| - name: Build report | |
| run: | | |
| CSV=$(ls -1 results-1000x/agg-*.csv | tail -n1) | |
| META=$(ls -1 results-1000x/meta-*.yaml | tail -n1 || true) | |
| python3 bench/make_report.py --csv "$CSV" ${META:+--meta "$META"} --out results-1000x | |
| - name: Upload 1000x artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: results-1000x | |
| path: results-1000x |