Skip to content

Commit

Permalink
ci: Fix incorrect wheels name on publish (#587)
Browse files Browse the repository at this point in the history
Fixes #586, which was broken when we moved `pyproject.toml` in #546.

Running `maturin build` from the root dir tries to build the workspace
project, creating an invalid wheel name. This PR updates the ci job and
the `just build` command to run maturin from inside `/hugr-py/`.

Maturin is still configured as a build tool in the workspace so that
`maturin develop` works everywhere. In that case we don't care about the
project name.
  • Loading branch information
aborgna-q authored Sep 5, 2024
1 parent d9538d3 commit e3f9da1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
permissions:
contents: read

env:
MODULE_DIR: tket2-py

jobs:
# Check if the tag matches the package name,
# or if the workflow is running on a non-release event.
Expand Down Expand Up @@ -67,6 +70,7 @@ jobs:
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
working-directory: ${{ env.MODULE_DIR }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -100,6 +104,7 @@ jobs:
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: musllinux_1_2
working-directory: ${{ env.MODULE_DIR }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -129,6 +134,7 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
working-directory: ${{ env.MODULE_DIR }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -157,6 +163,7 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
working-directory: ${{ env.MODULE_DIR }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -174,6 +181,7 @@ jobs:
with:
command: sdist
args: --out dist
working-directory: ${{ env.MODULE_DIR }}
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
Expand All @@ -194,3 +202,4 @@ jobs:
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
working-directory: ${{ env.MODULE_DIR }}
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ check:

# Compile the wheels for the python package.
build:
uv run maturin build --release
cd tket2-py && uv run maturin build --release

# Run all the tests.
test language="[rust|python]" : (_run_lang language \
Expand Down

0 comments on commit e3f9da1

Please sign in to comment.