-
Notifications
You must be signed in to change notification settings - Fork 156
59 lines (50 loc) · 1.4 KB
/
benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Benchmark
on:
push:
branches: [main, "[0-9]+.[0-9]+.x"]
pull_request:
branches: [main]
jobs:
benchmark:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0} # -e to fail on error, -l for mamba
strategy:
fail-fast: false
matrix:
python: ["3.12"]
os: [ubuntu-latest]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
ASV_DIR: "./benchmarks"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch origin main:main
if: ${{ github.ref_name != 'main' }}
# Errors on main branch
- uses: mamba-org/setup-micromamba@v2
with:
environment-name: asv
cache-environment: true
# Deps documented in https://asv.readthedocs.io/en/latest/installing.html
# libmambapy upper bound: https://github.com/airspeed-velocity/asv/issues/1438
create-args: >-
python=${{ matrix.python }}
asv
libmambapy<2
conda-build
- name: Cache datasets
uses: actions/cache@v4
with:
path: |
~/.cache
key: benchmark-state-${{ hashFiles('benchmarks/**') }}
- name: Quick benchmark run
working-directory: ${{ env.ASV_DIR }}
run: |
asv machine --yes
asv run --quick --show-stderr --verbose