-
Notifications
You must be signed in to change notification settings - Fork 356
78 lines (71 loc) · 2.16 KB
/
codspeed.yml
File metadata and controls
78 lines (71 loc) · 2.16 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CodSpeed Benchmarks
on:
push:
branches:
- develop
- main
pull_request:
workflow_dispatch:
# Required for OIDC authentication
permissions:
contents: read
actions: read
id-token: write
jobs:
benchmarks:
# Benchmarks are sharded by functionality:
# - input-io: model/simulation input file I/O
# - output-io: model output file readers
# - pre-post: pre/postprocessing, grids, rasters, arrays, export
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard:
- name: "input-io"
files: >-
benchmark_mf6_input.py
benchmark_mf2005_input.py
- name: "output-io"
files: >-
benchmark_cellbudgetfile.py
benchmark_zonebudget.py
benchmark_mf6listbudget.py
benchmark_headfile.py
benchmark_headufile.py
benchmark_formattedfile.py
benchmark_pathlinefile.py
benchmark_endpointfile.py
benchmark_mtlistfile.py
benchmark_sfroutputfile.py
benchmark_ucnfile.py
benchmark_mflistbudget.py
benchmark_mfusglistbudget.py
- name: "pre-post"
files: >-
benchmark_gridintersect.py
benchmark_grids.py
benchmark_rasters.py
benchmark_arrays.py
benchmark_export.py
benchmark_postprocessing.py
name: "benchmarks (${{ matrix.shard.name }})"
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
cache-dependency-glob: "**/pyproject.toml"
- name: Install FloPy with test dependencies
run: uv sync --all-extras
- name: Run benchmarks with CodSpeed
uses: CodSpeedHQ/action@v3
with:
run: cd autotest/benchmarks && uv run pytest ${{ matrix.shard.files }} --codspeed
env:
CODSPEED_SHARD_NAME: ${{ matrix.shard.name }}