forked from langchain-ai/deepagents
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (63 loc) · 2.01 KB
/
Copy path_benchmark.yml
File metadata and controls
72 lines (63 loc) · 2.01 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
# Reusable workflow: CodSpeed wall-time benchmarks
#
# Runs pytest-benchmark tests under CodSpeed instrumentation so that
# regressions are tracked across commits on the CodSpeed dashboard.
#
# Authenticates via OpenID Connect (OIDC) — no repository secret required.
name: "Benchmark"
on:
workflow_call:
inputs:
working-directory:
description: "Package directory (e.g. libs/deepagents)"
required: true
type: string
python-version:
description: "Python version"
required: false
type: string
default: "3.13"
has-memory-benchmarks:
description: "Whether the package defines memory_benchmark tests"
required: false
type: boolean
default: false
permissions:
contents: read
env:
UV_NO_SYNC: "true"
jobs:
benchmark:
name: "CodSpeed"
runs-on: codspeed-macro
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- name: "Checkout"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: "Set up Python + uv"
uses: ./.github/actions/uv_setup
with:
python-version: ${{ inputs.python-version }}
working-directory: ${{ inputs.working-directory }}
enable-cache: "true"
cache-suffix: benchmark-${{ inputs.python-version }}
- name: "Install dependencies"
run: uv sync --group test
- name: "Run benchmarks"
uses: CodSpeedHQ/action@0ca9cbbf4623b599a6c3ed4fc8a922942705d9f1 # v5.0.2
with:
working-directory: ${{ inputs.working-directory }}
run: make bench
mode: walltime
- name: "Run memory benchmarks"
if: ${{ inputs.has-memory-benchmarks }}
uses: CodSpeedHQ/action@0ca9cbbf4623b599a6c3ed4fc8a922942705d9f1 # v5.0.2
with:
working-directory: ${{ inputs.working-directory }}
run: make bench-memory
mode: memory