-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (51 loc) · 1.44 KB
/
codspeed.yml
File metadata and controls
64 lines (51 loc) · 1.44 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
name: CodSpeed Benchmarks
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
python-benchmarks:
name: Python benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Create virtualenv
run: |
python -m venv .venv
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=${{ github.workspace }}/.venv" >> $GITHUB_ENV
- name: Build and install mortie
run: |
pip install maturin
maturin develop --release
pip install -e ".[bench]"
- name: Run Python benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: simulation
run: pytest benchmarks/ --codspeed -v
rust-benchmarks:
name: Rust benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-codspeed
run: cargo install cargo-codspeed
- name: Build Rust benchmarks
run: cargo codspeed build
- name: Run Rust benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: simulation
run: cargo codspeed run