Now Github Actions provides python3 via setup-python also for Apple Silicon Macs #55
Workflow file for this run
This file contains 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 | |
env: | |
CIBW_BUILD_VERBOSITY: 3 | |
CIBW_BUILD: "cp37-macosx_x86_64 cp38-macosx_universal2 cp39-macosx_universal2 cp310-macosx_universal2 cp311-macosx_universal2" | |
CIBW_ARCHS_MACOS: "x86_64 universal2" | |
CIBW_TEST_COMMAND: python -c "from pyobjus import autoclass, objc_str" | |
CIBW_TEST_SKIP: "*arm64*" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: python -m pip install --upgrade twine cibuildwheel cython | |
- name: Build sdist | |
run: | | |
python setup.py sdist --formats=gztar | |
- name: Build wheels | |
run: | | |
python -m cibuildwheel --output-dir dist | |
- name: Create artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: wheels | |
path: dist | |
- name: Upload to GitHub Releases | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/[email protected] | |
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" |