-
Notifications
You must be signed in to change notification settings - Fork 719
58 lines (46 loc) · 1.36 KB
/
benchmark.yml
File metadata and controls
58 lines (46 loc) · 1.36 KB
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
name: Benchmark
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
FORCE_COLOR: "1"
jobs:
benchmark:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python: ["3.13"]
os: [ubuntu-latest]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
ASV_DIR: "./benchmarks"
steps:
- uses: actions/checkout@v6
with: { fetch-depth: 0 } # no blob:none so ASV can compare commits
- name: Fetch main branch for `asv run`’s hash
run: git fetch origin main:main
if: ${{ github.ref_name != 'main' }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Cache datasets
uses: actions/cache@v5
with:
path: |
~/.cache
key: benchmark-state-${{ hashFiles('benchmarks/**') }}
- name: Install dependencies
# https://github.com/airspeed-velocity/asv/issues/1577
run: pip install 'asv>=0.6.4' 'py-rattler<0.22'
- name: Configure ASV
working-directory: ${{ env.ASV_DIR }}
run: asv machine --yes
- name: Quick benchmark run
working-directory: ${{ env.ASV_DIR }}
run: asv run --dry-run --quick --show-stderr --verbose HEAD^!