Skip to content

Commit

Permalink
Feat: migrate codspeed workflow to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Sunglasses committed Nov 19, 2024
1 parent 3f2e79a commit f7eaa05
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,37 @@ on:
jobs:
benchmarks:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version:
- "3.8"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}


- name: Install dependencies
- name: Install dependencies with uv
run: |
python -m pip install --upgrade pip
pip install poetry==1.3.0
poetry export --with test --with dev --without-hashes --output requirements.txt
pip install -r requirements.txt
pip install -e .
uv venv --seed
uv run python -m pip install --upgrade pip
uv add pre-commit poetry maturin pytest patchelf
uv run poetry export --with test --with dev --without-hashes --output requirements.txt
uv run pip install -r requirements.txt
uv run pip install -e .
- name: Add macos target
if: matrix.os == 'macos'
run: rustup target add aarch64-apple-darwin
- name: Setup Rust part of the project
run: |
maturin build -i python --universal2 --out dist
pip install --no-index --find-links=dist/ robyn
uv run pip install --no-index --find-links=dist/ robyn
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest integration_tests --codspeed
run: uv run pytest integration_tests --codspeed

0 comments on commit f7eaa05

Please sign in to comment.