Merge pull request #7 from dleemiller/feature/64-bit-binary-rax #4
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: Build Upload MacOS | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build-and-publish: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
python-version: ['3.9'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade setuptools and pip | |
run: | | |
python -m pip install --upgrade pip setuptools | |
- name: Install additional dependencies | |
run: | | |
python -m pip install wheel twine cibuildwheel==1.9.0 delocate==0.10.7 | |
- name: Set MACOSX_DEPLOYMENT_TARGET | |
run: echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV | |
- name: Build package | |
env: | |
CIBW_ARCHS: "x86_64 arm64" | |
run: | | |
cibuildwheel --platform auto --output-dir wheelhouse | |
- name: List wheelhouse contents | |
run: ls -l wheelhouse | |
- name: List wheel dependencies | |
run: | | |
delocate-listdeps --all wheelhouse/*.whl | |
- name: Check binary architectures | |
run: | | |
for whl in wheelhouse/*.whl; do | |
unzip -l "$whl" | |
delocate-listdeps --depending "$whl" | |
delocate-listdeps --all "$whl" | |
done | |
- name: Repair wheel | |
run: | | |
delocate-wheel --require-archs x86_64 -w repaired_wheel wheelhouse/*.whl --verbose | |
- name: Publish package | |
if: github.event_name == 'push' | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
twine upload repaired_wheel/*.whl | |