Add iOS configuration to cibuildwheel (for Python 3.14 only) #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy sdist/wheels | |
| on: [push, pull_request] | |
| jobs: | |
| deploy: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Build sdist | |
| run: | | |
| pip install setuptools Cython | |
| python setup.py sdist --formats=gztar | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.3.0 | |
| env: | |
| CIBW_PLATFORM: "macos ios" | |
| CIBW_ARCHS_MACOS: "universal2" | |
| CIBW_ARCHS_IOS: "arm64_iphoneos arm64_iphonesimulator x86_64_iphonesimulator" | |
| CIBW_BUILD: "cp310-macosx_universal2 cp311-macosx_universal2 cp312-macosx_universal2 cp313-macosx_universal2 cp314-macosx_universal2 cp314-ios_arm64_iphoneos cp314-ios_arm64_iphonesimulator cp314-ios_x86_64_iphonesimulator" | |
| CIBW_TEST_COMMAND: python -c "from pyobjus import autoclass, objc_str" | |
| with: | |
| output-dir: dist | |
| - name: Create artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels | |
| path: dist | |
| - name: Upload to GitHub Releases | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2.4.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: dist/* | |
| - name: Publish to PyPI | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
| run: | | |
| twine upload dist/* | |
| - name: Test sdist | |
| run: | | |
| pip uninstall cython -y | |
| root="$(pwd)" | |
| cd ~ | |
| pyobjus_fname=$(ls $root/dist/pyobjus-*.tar.gz) | |
| pip install "$pyobjus_fname" | |
| python -c "from pyobjus import autoclass, objc_str" |