Skip to content

Commit

Permalink
Bump python version for benchmarks (#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
art049 authored Nov 14, 2023
1 parent a35b182 commit 439eeac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'

- uses: actions/cache@v3
id: cache-py
Expand Down Expand Up @@ -48,10 +48,12 @@ jobs:

- name: cache rust
uses: Swatinem/rust-cache@v2
with:
key: v1

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

- name: Compile pydantic-core for benchmarking
run: |
pip install -e . --config-settings=build-args='--verbose' -v
pip install -e . --config-settings=build-args='--verbose --profile codspeed' -v
env:
CONST_RANDOM_SEED: 0 # Fix the compile time RNG seed
RUSTFLAGS: "-Cprofile-use=${{ github.workspace }}/merged.profdata"
Expand Down
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ strip = true
debug = true
strip = false

[profile.codspeed]
inherits = "release"
debug = true
strip = false

[dev-dependencies]
pyo3 = { version = "0.20.0", features = ["auto-initialize"] }

Expand Down

0 comments on commit 439eeac

Please sign in to comment.