Skip to content

chore: bump versions for v1.4.0 release #78

chore: bump versions for v1.4.0 release

chore: bump versions for v1.4.0 release #78

name: Benchmark - Tool Parser
on:
push:
branches: [ main ]
paths:
- 'model_gateway/benches/tool_parser_benchmark.rs'
- 'crates/tool_parser/**'
- '!crates/tool_parser/**/tests/**'
- '!crates/tool_parser/**/*_test.rs'
- '!crates/tool_parser/**/test_*.rs'
pull_request:
branches: [ main ]
paths:
- 'model_gateway/benches/tool_parser_benchmark.rs'
- 'crates/tool_parser/**'
- '!crates/tool_parser/**/tests/**'
- '!crates/tool_parser/**/*_test.rs'
- '!crates/tool_parser/**/test_*.rs'
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
concurrency:
group: benchmark-tool-parser-${{ github.ref }}
cancel-in-progress: true
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "true"
permissions:
contents: read
jobs:
benchmark:
name: Tool Parser
if: github.repository == 'lightseekorg/smg'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 100
- name: Setup Rust
uses: ./.github/actions/setup-rust
- name: Run benchmark
timeout-minutes: 40
run: |
source "$HOME/.cargo/env"
cargo bench --bench tool_parser_benchmark 2>&1 | tee benchmark_output.txt
- name: Upload benchmark results
if: always()
uses: actions/upload-artifact@v7
with:
name: tool-parser-results-${{ github.sha }}
path: |
target/criterion/tool_parser*/
benchmark_output.txt
retention-days: 30
- name: Show sccache stats
if: always()
run: sccache --show-stats || true
- name: Summary
if: always()
run: |
echo "## Tool Parser Benchmark" >> $GITHUB_STEP_SUMMARY
if [ -f benchmark_output.txt ]; then
echo '```' >> $GITHUB_STEP_SUMMARY
tail -100 benchmark_output.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
fi