Skip to content

Commit

Permalink
Revert "ci: use locally built pydantic-core with debug symbols (pydan…
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle authored Nov 22, 2024
1 parent 9a797d9 commit f9f4aee
Showing 1 changed file with 2 additions and 47 deletions.
49 changes: 2 additions & 47 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
jobs:
codspeed-profiling:
name: CodSpeed profiling
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand All @@ -26,56 +26,11 @@ jobs:
# Using this action is still necessary for CodSpeed to work:
- uses: actions/setup-python@v5
with:
python-version: "3.12"

- id: core-version
name: resolve pydantic-core tag
run: |
set -uex -o pipefail
echo core-ref=$(python -c "
import re
import tomllib
pyproject_toml = tomllib.loads(open('pyproject.toml').read())
core = next(d for d in pyproject_toml['project']['dependencies'] if d.startswith('pydantic-core'))
if (result := re.search(r'==(.+)', core)) is not None:
print(f'v{result.group(1)}')
elif (result := re.search(r'@ git\+https://github\.com/pydantic/pydantic-core\.git@(.+)', core)) is not None:
print(result.group(1))
else:
raise RuntimeError('Could not resolve pydantic-core ref')
") >> $GITHUB_OUTPUT
python-version: '3.12'

- name: install deps
run: uv sync --python 3.12 --group testing-extra --extra email --frozen

- name: checkout pydantic-core
uses: actions/checkout@v4
with:
repository: pydantic/pydantic-core
ref: ${{ steps.core-version.outputs.core-ref }}
path: pydantic-core

- name: install rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools

- name: cache rust
uses: Swatinem/rust-cache@v2
with:
workspaces: pydantic-core

- name: install pydantic-core with profiling symbols
run: |
uv pip install pip
uv run bash -c "cd pydantic-core && pip install -r tests/requirements.txt && pip uninstall --yes pytest-speed && make build-pgo"
env:
CARGO_PROFILE_RELEASE_DEBUG: "line-tables-only"
CARGO_PROFILE_RELEASE_STRIP: "false"

- name: Run CodSpeed benchmarks
uses: CodSpeedHQ/action@v3
with:
Expand Down

0 comments on commit f9f4aee

Please sign in to comment.