Bump scitools/workflows from 2024.09.9 to 2024.10.0 #403
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
# reference: | |
# - https://github.com/actions/cache | |
# - https://github.com/actions/checkout | |
name: benchmark-check | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
- "v*x" | |
- "!auto-update-lockfiles" | |
- "!pre-commit-ci-update-config" | |
- "!dependabot/*" | |
tags: | |
- "v*" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
benchmark: | |
name: "performance benchmarks (py${{ matrix.python-version }})" | |
runs-on: ubuntu-latest | |
env: | |
PY_VER: "3.10" | |
IRIS_TEST_DATA_LOC_PATH: benchmarks | |
IRIS_TEST_DATA_PATH: benchmarks/iris-test-data | |
IRIS_TEST_DATA_VERSION: "2.19" | |
#: If you change the IRIS_SOURCE here you will also need to change it in | |
#: the noxfile and the tests and wheel workflows. | |
IRIS_SOURCE: "github:main" | |
ENV_CACHE_BUILD: "0" | |
TEST_DATA_CACHE_BUILD: "0" | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: "checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- if: ${{ github.event_name == 'pull_request' }} | |
# TODO: remove this, so we can benchmark using GHA's default | |
# commit - a simulated merge. Requires adapting | |
# --session="benchmarks(branch)" to accept inputs for both | |
# commits to compare (instead of deriving one of them). | |
# Currently, this checks out the HEAD of the pull request. | |
run: git checkout HEAD^2 | |
- name: Install ASV & Nox | |
run: | | |
pip install asv nox | |
- name: Cache environment directories | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.nox | |
benchmarks/.asv/env | |
$CONDA/pkgs | |
key: ${{ runner.os }}-${{ hashFiles('requirements/') }}-${{ env.ENV_CACHE_BUILD }}-${{ env.IRIS_SOURCE }} | |
- name: Benchmark script | |
run: | | |
if ${{ github.event_name != 'pull_request' }}; then export COMPARE="HEAD~"; else export COMPARE="origin/${{ github.base_ref }}"; fi; | |
python benchmarks/bm_runner.py branch ${COMPARE} | |
- name: Archive ASV results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: asv-report | |
path: | | |
benchmarks/.asv/results |