diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 7a608dda2..5843a17d0 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -9,35 +9,66 @@ on: - ci/python-ci tags: - '*' + # TODO: Select the target package to build, based on the tag prefix jobs: build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Build wheels on ${{ matrix.runner.os }}-${{ matrix.runner.arch }} + runs-on: ${{ matrix.runner.os }} strategy: matrix: - # macos-13 is an intel runner, macos-14 is apple silicon - os: [ubuntu-latest, windows-latest, macos-13, macos-14] + runner: + - os: ubuntu-latest + arch: x86_64 + - os: ubuntu-latest + arch: aarch64 + - os: ubuntu-latest + arch: i686 + - os: ubuntu-latest + arch: ppc64le + - os: ubuntu-latest + arch: s390x + - os: windows-latest + arch: x86_64 + - os: macos-13 + arch: x86_64 + - os: macos-latest + arch: arm64 steps: - uses: actions/checkout@v4 - name: Build wheels uses: pypa/cibuildwheel@v2.17.0 + env: + CIBW_ARCHS_LINUX: ${{ matrix.runner.arch }} + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + CIBW_MANYLINUX_I686_IMAGE: manylinux2014 + CIBW_ARCHS_MACOS: 'x86_64 arm64' + CIBW_TEST_SKIP: '*-macosx_arm64' - uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + name: cibw-wheels-${{ matrix.runner.os }}-${{ matrix.runner.arch }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl build_sdist: name: Build source distribution runs-on: ubuntu-latest + strategy: + matrix: + # TODO: Auto-select targets packages to build + # And filter what gets build by cibuildwheel + package: + - 'quantinuum-hugr-py' + steps: - uses: actions/checkout@v4 - name: Build sdist - run: pipx run build --sdist + run: | + cd ${{ matrix.package }} + pipx run build --sdist - uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 89d73fa15..35e1c5609 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -3,10 +3,11 @@ name: Release-please 🐍 on: workflow_dispatch: {} - push: - branches: - - main - - ci/python-ci + # TODO: Re-enable + #push: + # branches: + # - main + # - ci/python-ci permissions: contents: write @@ -17,7 +18,7 @@ jobs: name: Create release PR runs-on: ubuntu-latest steps: - - uses: google-github-actions/release-please-action@v4 + - uses: google-github-actions/release-please-action@v4.1 with: #path: "quantinuum-hugr-py" token: ${{ secrets.GITHUB_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 02f5b32b2..7667f6108 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,7 @@ name = "hugr-project" version = "0.0.0" authors = ["TKET development team "] readme = "README.md" -packages = [] - +packages = [{ include = "quantunuum_hugr", from = "quantunuum-hugr-py" }] package-mode = false [tool.poetry.group.main.dependencies]