Skip to content

Commit 3d25c5f

Browse files
authored
Merge pull request #281 from marcpabst/master
Add iOS builds
2 parents 2cdcd34 + ffa9147 commit 3d25c5f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/wheels.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,49 @@ jobs:
6767
with:
6868
path: ./wheelhouse/*.whl
6969
retention-days: 7
70+
71+
build_ios:
72+
name: Build wheels for iOS
73+
runs-on: macos-latest
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v4.2.2
77+
with:
78+
submodules: true
79+
80+
- name: Set up Python
81+
uses: actions/setup-python@v5.5.0
82+
with:
83+
python-version: "3.x"
84+
85+
- name: Install cibuildwheel
86+
run: |
87+
python -m pip install -U pip
88+
# Use main branch until iOS support is released.
89+
# python -m pip install cibuildwheel==3.0.0
90+
python -m pip install git+https://github.com/pypa/cibuildwheel.git
91+
92+
- name: Build wheels
93+
run: python -m cibuildwheel
94+
env:
95+
IPHONEOS_DEPLOYMENT_TARGET: "23.0"
96+
CIBW_PLATFORM: ios
97+
CIBW_ARCHS: auto
98+
CIBW_BUILD_VERBOSITY: 1
99+
CIBW_BEFORE_BUILD_IOS: |
100+
# download wheel and pretend that it's compatible with the current platform settings
101+
curl https://files.pythonhosted.org/packages/8b/f1/672d303ddf17c24fc83afd712316fda78dc6fce1cd53011b839483e1ecc8/cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl -L -o cffi-1.17.1-py3-none-any.whl && \
102+
pip install cffi-1.17.1-py3-none-any.whl && \
103+
# install the rest of the dependencies
104+
python -m pip install setuptools wheel
105+
CIBW_BEFORE_BUILD:
106+
python -m pip install setuptools wheel cffi
107+
CIBW_XBUILD_TOOLS : "curl pkg-config tar"
108+
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
109+
110+
- uses: actions/upload-artifact@v4
111+
if: ${{ github.ref == 'refs/heads/master' }}
112+
with:
113+
name: cibw-wheels-ios-${{ matrix.os }}-${{ strategy.job-index }}
114+
path: ./wheelhouse/*.whl
115+
retention-days: 7

0 commit comments

Comments
 (0)