Benchmark #26
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: | |
schedule: | |
- cron: "0 0 * * *" # Run daily at midnight UTC | |
workflow_dispatch: # Allow manual trigger | |
env: | |
PYTHON_VERSION: "3.10" | |
WORKING_DIR: ${{ github.workspace }}/src | |
BENCHMARKS_OUTPUT: ${{ github.workspace }}/src/results | |
jobs: | |
benchmark: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ env.WORKING_DIR }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install asv virtualenv lf-asv-formatter | |
- name: Create ASV machine config file | |
run: asv machine --machine gh-runner --yes | |
- name: Run Benchmarks - `main` | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
run: | | |
asv run --interleave-rounds -a repeat=3 || true | |
- name: BENCHMARK RESULTS | |
run: | | |
asv show HEAD | tee ${{ env.BENCHMARKS_OUTPUT }} |