Skip to content

Commit

Permalink
update bench gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
Anexen committed Jan 27, 2024
1 parent b7abef6 commit 1672a3a
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,28 @@ on:
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@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: actions-rs/toolchain@v1
python-version: 3.11
- uses: actions-rust-lang/setup-rust-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 --bench comparison | tee output.txt
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
tool: 'cargo'
Expand All @@ -47,4 +41,4 @@ jobs:
benchmark-data-dir-path: docs/bench
output-file-path: output.txt
auto-push: true
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1672a3a

Please sign in to comment.