chore: benchmarking suite #2
Workflow file for this run
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: Performance Benchmarks | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| asv-continuous: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| name: Install Python ${{ matrix.python_version }} | |
| with: | |
| python-version: | | |
| 3.8 | |
| 3.9 | |
| 3.10 | |
| 3.11 | |
| 3.12 | |
| 3.13 | |
| 3.14 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 | |
| - name: Run ASV continuous benchmark | |
| run: uv run asv continuous main ${{ github.head_ref }} --sort default > benchmark_output.txt 2>&1 | |
| continue-on-error: true | |
| - name: Post benchmark results as PR comment | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const output = fs.readFileSync('benchmark_output.txt', 'utf8'); | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '## Performance Benchmark Results\n\n```\n' + output + '\n```' | |
| }); |