Skip to content

Commit 439eeac

Browse files
authored
Bump python version for benchmarks (#1064)
1 parent a35b182 commit 439eeac

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/codspeed.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- uses: actions/setup-python@v4
2020
with:
21-
python-version: '3.10'
21+
python-version: '3.12'
2222

2323
- uses: actions/cache@v3
2424
id: cache-py
@@ -48,10 +48,12 @@ jobs:
4848

4949
- name: cache rust
5050
uses: Swatinem/rust-cache@v2
51+
with:
52+
key: v1
5153

5254
- name: Compile pydantic-core for profiling
5355
run: |
54-
pip install -e . --config-settings=build-args='--verbose' -v
56+
pip install -e . --config-settings=build-args='--verbose --profile codspeed' -v
5557
env:
5658
CONST_RANDOM_SEED: 0 # Fix the compile time RNG seed
5759
RUSTFLAGS: "-Cprofile-generate=${{ github.workspace }}/profdata"
@@ -64,7 +66,7 @@ jobs:
6466

6567
- name: Compile pydantic-core for benchmarking
6668
run: |
67-
pip install -e . --config-settings=build-args='--verbose' -v
69+
pip install -e . --config-settings=build-args='--verbose --profile codspeed' -v
6870
env:
6971
CONST_RANDOM_SEED: 0 # Fix the compile time RNG seed
7072
RUSTFLAGS: "-Cprofile-use=${{ github.workspace }}/merged.profdata"

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ strip = true
6363
debug = true
6464
strip = false
6565

66+
[profile.codspeed]
67+
inherits = "release"
68+
debug = true
69+
strip = false
70+
6671
[dev-dependencies]
6772
pyo3 = { version = "0.20.0", features = ["auto-initialize"] }
6873

0 commit comments

Comments
 (0)