Skip to content

Commit

Permalink
Update pip.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-johnson committed Dec 15, 2023
1 parent af50eee commit e51f071
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# UTC form (aka `date +%s`).
pip-labels:
name: Create Label for PyPI Packages
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
halide_pypi_label: ${{ steps.make_label.outputs.unix_time_utc }}
steps:
Expand All @@ -37,7 +37,7 @@ jobs:
pip-linux:
name: Package Halide Python bindings

runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: pip-labels
environment:
name: pypi
Expand Down Expand Up @@ -79,7 +79,8 @@ jobs:
env:
# CIBW_ARCHS_LINUX: "x86_64 aarch64"
CIBW_ARCHS_LINUX: "${{ matrix.arch }}"
CIBW_BUILD: "cp38-manylinux* cp39-manylinux* cp310-manylinux* cp311-manylinux*"
# CIBW_BUILD: "cp38-manylinux* cp39-manylinux* cp310-manylinux* cp311-manylinux*"
CIBW_BUILD: "cp38-manylinux_${{ matrix.arch }}"
# TODO: --global-option is deprecated
# TODO: wtf is `egg_info` and/or `-b.dev`
# CIBW_CONFIG_SETTINGS: "--global-option=egg_info --global-option=-b.dev${{ needs.pip-labels.outputs.halide_pypi_label }} --global-option=--build-number --global-option=${{github.run_id}}"
Expand All @@ -97,7 +98,7 @@ jobs:
-DWITH_PYTHON_STUBS=NO && \
cmake --build build --target install
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels
path: ./wheelhouse/*.whl
Expand Down Expand Up @@ -214,35 +215,23 @@ jobs:
# CIBW_CONFIG_SETTINGS: "--global-option=egg_info --global-option=-b.dev${{ needs.pip-labels.outputs.halide_pypi_label }} --global-option=--build-number --global-option=${{github.run_id}}"
# CIBW_ARCHS_MACOS: "universal2"

# - uses: actions/upload-artifact@v3
# - uses: actions/upload-artifact@v4
# with:
# name: wheels
# path: ./wheelhouse/*.whl

# pip-sdist:
# name: Make SDist
# runs-on: ubuntu-latest
# needs: pip-labels
# steps:
# - uses: actions/checkout@v4
# - run: pipx run build --sdist -C--global-option=egg_info -C--global-option=-b.dev${{ needs.pip-labels.outputs.halide_pypi_label }}
# - uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist/*.tar.gz

publish:
name: Publish on PyPI
# needs: [ pip-linux, pip-other, pip-sdist ]
needs: [ pip-linux ]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
path: dist

- uses: pypa/gh-action-pypi-publish@1.8.11
- uses: pypa/gh-action-pypi-publish@v1.8.11
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
Expand Down

0 comments on commit e51f071

Please sign in to comment.