-
-
Notifications
You must be signed in to change notification settings - Fork 17
50 lines (49 loc) · 1.41 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
45
46
47
48
49
50
name: Benchmark
on:
push:
tags: ['v*']
paths-ignore:
- 'docs/**'
workflow_dispatch:
inputs:
build:
description: 'Build'
required: true
default: true
jobs:
benchmark:
name: Run Rust benchmark
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event.inputs.build }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cache/pip
target
key: ubuntu-latest-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: pip install -r bench-requirements.txt
- name: Run benchmark
run: cargo +nightly bench --no-default-features --features tests --bench comparison | tee output.txt
- name: Store benchmark result
uses: rhysd/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.PERSONAL_GITHUB_TOKEN }}