Benchmark #70
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: Benchmark | |
on: | |
push: | |
tags: ['v*'] | |
paths-ignore: | |
- 'docs/**' | |
workflow_dispatch: | |
inputs: | |
build: | |
description: 'Build' | |
required: true | |
default: true | |
permissions: | |
contents: write | |
deployments: write | |
jobs: | |
benchmark: | |
name: Run Rust benchmark | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event.inputs.build }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
- run: pip install -r bench-requirements.txt | |
- name: Run benchmark | |
run: cargo +nightly bench --bench comparison | tee output.txt | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: Rust Benchmark | |
tool: 'cargo' | |
gh-pages-branch: main | |
gh-repository: github.com/Anexen/pyxirr | |
benchmark-data-dir-path: docs/bench | |
output-file-path: output.txt | |
auto-push: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} |