Run pandas ASV on CI #11
Workflow file for this run
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: Run ASV | |
on: | |
# TODO: Change to chron job | |
pull_request: | |
branches: | |
- main | |
env: | |
ENV_FILE: environment.yml | |
PANDAS_CI: 1 | |
permissions: | |
contents: read | |
jobs: | |
produce-asv-benchmarks: | |
name: ASV Benchmarks | |
runs-on: ubuntu-24.04 | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: pandas-dev/pandas | |
fetch-depth: 0 | |
- name: Set up Conda | |
uses: ./.github/actions/setup-conda | |
- name: Build pandas | |
uses: ./.github/actions/build_pandas | |
- name: Run ASV Benchmarks | |
run: | | |
cd asv_bench | |
asv machine --machine=asvrunner --yes | |
asv run --durations=30 --python=same --set-commit-hash=$(git rev-parse HEAD) --show-stderr --machine=asvrunner -b ^groupby.GroupByCythonAgg | |
# Move to a standard location | |
mv results/asvrunner/$(git rev-parse --short=8 HEAD)*.json results.json | |
- name: Save JSON results as an artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: results.json | |
path: asv_bench/results/asvrunner/results.json | |
retention-days: 14 | |
process-asv-benchmarks: | |
name: Process ASV Benchmarks | |
needs: produce-asv-benchmarks | |
runs-on: ubuntu-24.04 | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Upgrade build dependencies | |
run: pip install -U pip uv | |
- name: Install dependencies | |
run: uv pip install pandas pyarrow | |
- name: Download JSON results | |
uses: actions/download-artifact@v4 | |
with: | |
name: results.json | |
- name: Process ASV results | |
run: | | |
python process_results.py | |
- name: Save parquet results as an artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: results.parquet | |
path: results.parquet | |
retention-days: 14 |