Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/asv-benchmarking-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ jobs:
python-build
mamba

# asv rebuilds its own env under benchmarks/env/ each run; caching skips the
# solve. No restore-keys: asv reuses a restored env without checking it.
- name: Cache asv environment
uses: actions/cache@v6
with:
path: ${{ env.ASV_DIR }}/env
key: "asv-env-${{runner.os}}-${{runner.arch}}-${{hashFiles(env.CONDA_ENV_FILE, 'benchmarks/asv.conf.json')}}"

- name: Run Benchmarks
shell: bash -l {0}
id: benchmark
Expand Down
17 changes: 14 additions & 3 deletions benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@

// Customizable commands for installing and uninstalling the project.
// See asv.conf.json documentation.
// "install_command": ["in-dir={env_dir} python -mpip install {wheel_file}"],
//
// --no-deps: conda already installed every dependency from ci/environment.yml.
// --force-reinstall is asv's default; the version may not change (asv gh-1421).
"install_command": [
"in-dir={env_dir} python -m pip install {wheel_file} --no-deps --force-reinstall"
],
// "uninstall_command": ["return-code=any python -mpip uninstall -y {project}"],

// List of branches to benchmark. If not provided, defaults to "master"
Expand All @@ -57,6 +62,10 @@
"environment_type": "conda",
"conda_channels": ["conda-forge"],

// Same package set as the rest of CI, so benchmarks cannot drift from it:
// #1548 made cartopy, matplotlib and spatialpandas optional and broke two.
"conda_environment_file": "../ci/environment.yml",

// timeout in seconds for installing any dependencies in environment
// defaults to 10 min
"install_timeout": 600,
Expand Down Expand Up @@ -90,10 +99,12 @@
// new environments. A value of ``null`` means that the variable
// will not be set for the current combination.
//
// Only what ci/environment.yml lacks: the build tools, which asv seeds itself
// only when building an environment without a file, plus pyfma from PyPI.
"matrix": {
"python-build": [""],
"wheel": [""],
"setuptools_scm": [""],
"xarray": [""],
"netcdf4": [""],
"pip+pyfma": [""]
},

Expand Down
Loading