Merge branch 'main' into update-formula-aarch64-apple-darwin-68c61a43… #395
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
# act -W .github/workflows/benchmark.yml --container-architecture linux/amd64 -j benchmark -P ubuntu-latest=catthehacker/ubuntu:act-latest | |
name: Rust Benchmark | |
on: [push] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
benchmark: | |
name: Run Rust benchmark | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libasound2-dev | |
- name: Run benchmarks | |
run: | | |
cargo bench --bench pcm_decode_benchmark -- --output-format bencher | tee output.txt | |
- name: Download previous benchmark data | |
uses: actions/cache@v4 | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-benchmark | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: Rust Benchmark | |
tool: "cargo" | |
output-file-path: output.txt | |
external-data-json-path: ./cache/benchmark-data.json | |
fail-on-alert: true | |
# GitHub API token to make a commit comment | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
# Enable alert commit comment | |
comment-on-alert: true | |
# Enable Job Summary for PRs | |
summary-always: true | |
alert-comment-cc-users: "@louis030195" | |
- name: Upload benchmark results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: benchmark-results | |
path: output.txt |