Skip to content

Commit fa89526

Browse files
authored
Enable benchmarks (#651)
1 parent 440cb13 commit fa89526

File tree

2 files changed

+49
-4
lines changed

2 files changed

+49
-4
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,37 @@ jobs:
9191
with:
9292
name: Documentation
9393
path: _build/html
94+
benchmarks:
95+
defaults:
96+
run:
97+
shell: bash -el {0}
98+
runs-on: ubuntu-latest
99+
steps:
100+
- name: Checkout Repo
101+
uses: actions/checkout@v4
102+
- name: Cache conda
103+
uses: actions/cache@v4
104+
env:
105+
# Increase this value to reset cache if ci/environment.yml has not changed
106+
CACHE_NUMBER: 0
107+
with:
108+
path: ~/conda_pkgs_dir
109+
key:
110+
benchmarks-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment.yml') }}
111+
- uses: conda-incubator/setup-miniconda@v3
112+
with:
113+
activate-environment: sparse-dev
114+
allow-softlinks: true
115+
environment-file: ci/environment.yml
116+
python-version: '3.9'
117+
miniforge-version: latest
118+
- name: Install asv
119+
run: |
120+
pip install asv
121+
asv machine --yes
122+
- name: Run benchmarks
123+
run: |
124+
asv run --quick
94125
on:
95126
# Trigger the workflow on push or pull request,
96127
# but only for the main branch

asv.conf.json

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
{
2-
"dvcs": "git",
3-
"env_dir": ".asv/env",
2+
"branches": [
3+
"HEAD"
4+
],
5+
"build_command": [],
46
"environment_type": "conda",
5-
"html_dir": ".asv/html",
7+
"install_command": [
8+
"pip install --no-deps ."
9+
],
10+
"matrix": {
11+
"env": {},
12+
"env_nobuild": {},
13+
"req": {
14+
"numba": [],
15+
"numpy": []
16+
}
17+
},
618
"project": "sparse",
719
"project_url": "https://sparse.pydata.org/",
820
"repo": ".",
9-
"results_dir": ".asv/results",
21+
"uninstall_command": [
22+
"pip uninstall sparse --yes"
23+
],
1024
"version": 1
1125
}

0 commit comments

Comments
 (0)