Skip to content

Commit fec2f8e

Browse files
committed
fix(ci): swap maturin develop for pip install -e (no venv on runners)
The previous CI change called `maturin develop --release --extras dev,full`, but `maturin develop` requires an active virtualenv and the GitHub-hosted Python from setup-python lives in the toolcache, not in a venv. All 12 matrix jobs (3 OS x 4 Python) failed with: 💥 maturin failed Caused by: Couldn't find a virtualenv or conda environment... Use `pip install -e ".[dev,full]" --no-build-isolation` instead: pip invokes maturin via PEP 660, builds the Rust extension and installs treemapper + extras in one shot. `--no-build-isolation` reuses the already-installed maturin and skips spinning up a fresh build venv. Also drop the `bench-image` and `smoke-bench` jobs from CI — they built a Docker image from `Dockerfile.bench`, which was deleted in the previous commit as paper-track scaffolding. The bench-sweep workflow is workflow_dispatch-only and orthogonal to the release path.
1 parent a9e2ad8 commit fec2f8e

1 file changed

Lines changed: 6 additions & 80 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,20 @@ jobs:
155155
key: cargo-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('diffctx/Cargo.lock') }}
156156
restore-keys: cargo-${{ runner.os }}-py${{ matrix.python-version }}-
157157

158-
- name: Install Python dev tools
158+
- name: Install build backend
159159
run: |
160160
python -m pip install --upgrade pip
161161
pip install "maturin>=1.10,<1.11"
162162
163-
- name: Build and install treemapper (with Rust _diffctx)
163+
- name: Build and install treemapper (with Rust _diffctx) and dev deps
164164
shell: bash
165165
env:
166166
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
167167
run: |
168-
# maturin develop builds the Rust extension and installs the project editable.
169-
# Use --extras for dev/tree-sitter so tests have all deps available.
170-
maturin develop --release --extras dev,full
168+
# PEP 660 editable install — maturin builds the Rust extension and
169+
# pip installs everything (treemapper + [dev,full] extras). Skip build
170+
# isolation since we just installed maturin in this env.
171+
pip install -e ".[dev,full]" --no-build-isolation
171172
172173
- name: Run Tests with Coverage
173174
shell: bash
@@ -260,78 +261,3 @@ jobs:
260261
261262
- name: Check import contracts
262263
run: lint-imports
263-
264-
# ============================================================================
265-
# Bench image — build and push to GHCR on every push to main
266-
# ============================================================================
267-
bench-image:
268-
name: Build bench image
269-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
270-
runs-on: ubuntu-latest
271-
permissions:
272-
contents: read
273-
packages: write
274-
275-
steps:
276-
- name: Free disk space
277-
run: |
278-
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL || true
279-
sudo docker image prune -af || true
280-
df -h /
281-
282-
- uses: actions/checkout@v6
283-
284-
- uses: docker/setup-buildx-action@v4
285-
with:
286-
driver-opts: |
287-
image=moby/buildkit:latest
288-
network=host
289-
290-
- uses: docker/login-action@v4
291-
with:
292-
registry: ghcr.io
293-
username: ${{ github.actor }}
294-
password: ${{ secrets.GITHUB_TOKEN }}
295-
296-
- id: meta
297-
uses: docker/metadata-action@v6
298-
with:
299-
images: ghcr.io/${{ github.repository_owner }}/treemapper-bench
300-
tags: |
301-
type=ref,event=branch
302-
type=sha,prefix={{branch}}-,format=short
303-
type=raw,value=latest,enable=true
304-
305-
- name: Build and push (amd64)
306-
uses: docker/build-push-action@v7
307-
with:
308-
context: .
309-
file: Dockerfile.bench
310-
platforms: linux/amd64
311-
push: true
312-
tags: ${{ steps.meta.outputs.tags }}
313-
labels: ${{ steps.meta.outputs.labels }}
314-
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/treemapper-bench:buildcache
315-
cache-to: >-
316-
type=registry,ref=ghcr.io/${{ github.repository_owner }}/treemapper-bench:buildcache,
317-
mode=max,image-manifest=true,oci-mediatypes=true
318-
319-
# ============================================================================
320-
# Trigger smoke bench sweep after image is built and tests pass
321-
# ============================================================================
322-
smoke-bench:
323-
name: Trigger smoke sweep
324-
needs: [bench-image]
325-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
326-
runs-on: ubuntu-latest
327-
permissions:
328-
actions: write
329-
steps:
330-
- name: Dispatch bench-sweep (smoke)
331-
run: |
332-
gh workflow run bench-sweep.yml \
333-
--repo "${{ github.repository }}" \
334-
--ref main \
335-
--field mode=smoke
336-
env:
337-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)