Skip to content

Commit 707fc76

Browse files
committed
chore(ci): ignore local .wheelhouse; CI uploads wheels as artifact
1 parent f6afc05 commit 707fc76

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,25 @@ jobs:
4444
restore-keys: |
4545
${{ runner.os }}-pip-wheels-${{ matrix.python-version }}-
4646
47-
- name: Install build tools and uv
47+
- name: Install uv and create venv
4848
run: |
49-
python -m pip install --upgrade pip setuptools wheel
49+
python -m pip install --upgrade pip
5050
pip install uv
51+
# create a fresh .venv using uv immediately so subsequent steps use uv
52+
uv venv
5153
52-
- name: Build wheelhouse for project and dev deps
54+
- name: Build wheelhouse for project and dev deps (via uv)
5355
run: |
56+
# Install build tools and build backend into the uv-managed venv
57+
uv pip install --upgrade pip setuptools wheel hatchling
5458
# Build wheels for the project and development extras into .wheelhouse
55-
# This will be fast when the cache is warm.
56-
python -m pip wheel -w .wheelhouse "[dev]" || python -m pip wheel -w .wheelhouse ".[dev]"
57-
58-
- name: Create venv (uv)
59-
run: |
60-
# create a fresh .venv using uv
61-
uv venv
59+
# Use --no-build-isolation so the installed hatchling is visible to the build
60+
uv pip wheel -w .wheelhouse --no-build-isolation ".[dev]"
6261
6362
- name: Install project dev dependencies into venv from wheelhouse
6463
run: |
6564
# Install using only the local wheels for reproducibility / speed
66-
uv pip install --no-index --find-links .wheelhouse "[dev]" || uv pip install --no-index --find-links .wheelhouse ".[dev]"
65+
uv pip install --no-index --find-links .wheelhouse ".[dev]"
6766
6867
- name: Run ruff (via uv)
6968
run: uv run ruff check .

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,6 @@ dmypy.json
132132
# OS
133133
.DS_Store
134134
Thumbs.db
135+
136+
# Local wheelhouse built in CI or locally
137+
.wheelhouse/

0 commit comments

Comments
 (0)