Run ASV #3983
This file contains hidden or 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: | |
| # pull_request: | |
| # branches: | |
| # - main | |
| schedule: | |
| - cron: "40 * * * *" | |
| workflow_dispatch: | |
| env: | |
| ENV_FILE: environment.yml | |
| PANDAS_CI: 1 | |
| # Results and other data are stored away from the main branch. | |
| # This keeps the main branch clean and allows us to clear out | |
| # objects / history after being built up for long periods of time. | |
| BRANCH_NAME: pandas_2026_01_04 | |
| # Suppress cwd-on-sys.path so `python -m asv_runner` doesn't pick up the | |
| # uncompiled pandas source checkout at the workspace root. | |
| PYTHONSAFEPATH: "1" | |
| permissions: | |
| contents: read | |
| jobs: | |
| run: | |
| name: Run ASV and push results | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| shell: bash -e {0} | |
| permissions: | |
| contents: write | |
| steps: | |
| # In order to run pandas' actions, we have to checkout into the root directory. | |
| - name: Checkout pandas | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: pandas-dev/pandas | |
| fetch-depth: 0 | |
| - name: Checkout asv-runner results branch | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ env.BRANCH_NAME }} | |
| path: asv-runner/ | |
| # asv_runner scripts are run from the workflow's own ref (main on schedule, | |
| # whatever branch you choose on workflow_dispatch), not from whatever | |
| # stale copy lives on the storage branch. The storage branch is data-only. | |
| - name: Checkout asv-runner code | |
| uses: actions/checkout@v6 | |
| with: | |
| path: asv-runner-code/ | |
| - name: Claim next SHA | |
| id: claim | |
| run: | | |
| PYTHONPATH=asv-runner-code python -m asv_runner claim \ | |
| --storage-dir=asv-runner \ | |
| --repo-dir=. \ | |
| --branch=$BRANCH_NAME | |
| - name: Set up pixi | |
| if: steps.claim.outputs.new_commit == 'yes' | |
| uses: ./.github/actions/setup-pixi | |
| with: | |
| environment: "asv" | |
| - name: Checkout target SHA | |
| if: steps.claim.outputs.new_commit == 'yes' | |
| run: git checkout ${{ steps.claim.outputs.sha }} | |
| - name: Build pandas | |
| if: steps.claim.outputs.new_commit == 'yes' | |
| run: pixi run --environment asv build-pandas --editable -Csetup-args="--werror" | |
| - name: Run ASV Benchmarks | |
| if: steps.claim.outputs.new_commit == 'yes' | |
| env: | |
| SHA: ${{ steps.claim.outputs.sha }} | |
| run: | | |
| eval "$(pixi shell-hook -e asv)" | |
| PYTHONPATH=asv-runner-code python -m asv_runner benchmark \ | |
| --asv-dir=asv_bench \ | |
| --sha=$SHA | |
| - name: Push results | |
| if: steps.claim.outputs.new_commit == 'yes' | |
| env: | |
| SHA: ${{ steps.claim.outputs.sha }} | |
| run: | | |
| PYTHONPATH=asv-runner-code python -m asv_runner push \ | |
| --storage-dir=asv-runner \ | |
| --asv-dir=asv_bench \ | |
| --sha=$SHA \ | |
| --branch=$BRANCH_NAME |