Merge pull request #321 from rtk-rs/ci_script #140
This file contains 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: Benchmarking | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
benchmarking: | |
name: Benchmarking (API) | |
runs-on: ubuntu-latest | |
env: | |
CARGO: cargo | |
RUST_BACKTRACE: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- bench: hatanaka | |
sample_size: 100 | |
- bench: parsing | |
sample_size: 1000 | |
- bench: formatting | |
sample_size: 1000 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Bench | |
run: cargo bench --bench ${{ matrix.bench }} -- --sample-size ${{ matrix.sample_size }} > ${{ matrix.bench }}.txt | |
- name: Upload Results | |
run: python tools/parse_crit_benchmark.py < ${{ matrix.bench }}.txt >> $GITHUB_STEP_SUMMARY |