-
Notifications
You must be signed in to change notification settings - Fork 18
78 lines (71 loc) · 2.26 KB
/
codspeed.yml
File metadata and controls
78 lines (71 loc) · 2.26 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
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
env:
PYTHON_VERSION: "3.12"
SHARDS: 4
jobs:
benchmarks:
strategy:
matrix:
shard: [1, 2, 3, 4]
mode: ["instrumentation"] # , "walltime"
name: "Run ${{ matrix.mode }} benchmarks (Shard #${{ matrix.shard }})"
runs-on: ${{ matrix.mode == 'instrumentation' && 'ubuntu-24.04' || 'codspeed-macro' }}
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install required-version defined in uv.toml
uses: astral-sh/setup-uv@v5
- uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install local version of pytest-codspeed
run: |
sudo apt-get update
sudo apt-get install valgrind -y
uv sync --dev
sudo apt-get remove valgrind -y
- name: Install CodSpeed Runner
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/CodSpeedHQ/runner/releases/download/v4.2.1/codspeed-runner-installer.sh | sh
# Install custom valgrind
- name: Download Valgrind source
run: git clone https://github.com/CodSpeedHQ/valgrind-codspeed --branch dbg/obj-skip
- name: Install Valgrind
working-directory: valgrind-codspeed
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
automake \
autoconf \
libc6-dev \
gcc-multilib \
libc6-dev-i386 \
gdb \
docbook \
docbook-xsl \
docbook-xml \
xsltproc
./autogen.sh
./configure
make -j$(nproc)
sudo make install
- name: Run benchmarks
uses: CodSpeedHQ/action@chore/runner-branch
with:
runner-branch: dbg/obj-skip
mode: ${{ matrix.mode }}
run: uv run pytest tests/benchmarks/ --codspeed --test-group=${{ matrix.shard }} --test-group-count=${{ env.SHARDS }}
token: ${{ secrets.CODSPEED_TOKEN }}
all-checks:
runs-on: ubuntu-latest
steps:
- run: echo "All CI checks passed."
needs:
- benchmarks