Skip to content

Commit

Permalink
chore(cibw): build pure-Python wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
vytas7 committed Aug 30, 2024
1 parent 9c5786c commit fc9943a
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/cibuildwheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ on:
# NOTE(vytas): Also allow to release to Test PyPi manually.
workflow_dispatch:

# TODO(vytas): Just testing in a PR.
pull_request:
branches:
- master

jobs:
build-sdist:
# NOTE(vytas): We actually build sdist and pure-Python wheel.
name: sdist
runs-on: ubuntu-latest

Expand All @@ -25,11 +31,13 @@ jobs:
with:
python-version: "3.12"

- name: Build sdist
- name: Build sdist and pure-Python wheel
env:
FALCON_DISABLE_CYTHON: "Y"
run: |
pip install --upgrade pip
pip install --upgrade build
python -m build --sdist
python -m build
- name: Check built artifacts
run: |
Expand All @@ -39,7 +47,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
path: dist/falcon-*

build-wheels:
name: ${{ matrix.python }}-${{ matrix.platform.name }}
Expand Down Expand Up @@ -110,7 +118,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: cibw-wheel-${{ matrix.python }}-${{ matrix.platform.name }}
path: wheelhouse/*.whl
path: wheelhouse/falcon-*.whl

publish-sdist:
name: publish-sdist
Expand Down Expand Up @@ -148,14 +156,14 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
files: 'dist/*.tar.gz'

- name: Publish sdist to TestPyPI
- name: Publish sdist and pure-Python wheel to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'workflow_dispatch'
with:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/

- name: Publish sdist to PyPI
- name: Publish sdist and pure-Python wheel to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release'
with:
Expand Down Expand Up @@ -191,14 +199,14 @@ jobs:
run: |
tools/check_dist.py ${{ github.event_name == 'release' && format('-r {0}', github.ref) || '' }}
- name: Publish wheels to TestPyPI
- name: Publish binary wheels to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'workflow_dispatch'
with:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/

- name: Publish wheels to PyPI
- name: Publish binary wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release'
with:
Expand Down

0 comments on commit fc9943a

Please sign in to comment.