-
-
Notifications
You must be signed in to change notification settings - Fork 17
44 lines (42 loc) · 1.17 KB
/
bench.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 }}