Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 65 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,58 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

test-mobile:
permissions:
contents: read # to fetch code (actions/checkout)

name: Test (${{ matrix.config.platform }}, ${{ matrix.pyver }}, ${{ matrix.config.os }})
runs-on: ${{ matrix.config.os }}
needs: gen_llhttp
strategy:
matrix:
pyver: ["cp313", "cp314"]
config:
- os: ubuntu-latest
platform: android
archs: x86_64
- os: macos-14
platform: ios
archs: arm64_iphonesimulator
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Update pip, wheel, setuptools, build, twine
run: |
python -m pip install -U pip wheel setuptools build twine
- name: Install cython
run: >-
python -m
pip install -r requirements/cython.in -c requirements/cython.txt
- name: Restore llhttp generated files
uses: actions/download-artifact@v8
with:
name: llhttp
path: vendor/llhttp/build/
- name: Cythonize
run: |
make cythonize
- name: Build wheels and test
uses: pypa/cibuildwheel@v3.4.0
env:
CIBW_BUILD: ${{ matrix.pyver }}-*
CIBW_PLATFORM: ${{ matrix.config.platform }}
CIBW_ARCHS: ${{ matrix.config.archs }}
CIBW_TEST_REQUIRES: -r requirements/test.txt
CIBW_TEST_SOURCES: setup.cfg tests
CIBW_TEST_COMMAND: >-
python -m pytest -o 'addopts='-v -ra --showlocals -m 'not dev_mode and not autobahn'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow is missing the coverage steps, which is why codecov is complaining.


autobahn:
permissions:
contents: read # to fetch code (actions/checkout)
Expand Down Expand Up @@ -422,6 +474,7 @@ jobs:
needs:
- lint
- test
- test-mobile
- autobahn

runs-on: ubuntu-latest
Expand Down Expand Up @@ -492,14 +545,15 @@ jobs:
permissions:
contents: read # to fetch code (actions/checkout)

name: Build wheels on ${{ matrix.os }} ${{ matrix.qemu }} ${{ matrix.musl }}
name: Build wheels on ${{ matrix.os }} ${{ matrix.qemu }} ${{ matrix.musl }} ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
needs: pre-deploy
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "windows-11-arm", "macos-latest", "ubuntu-24.04-arm"]
qemu: ['']
musl: [""]
platform: [""]
include:
# Split ubuntu/musl jobs for the sake of speed-up
- os: ubuntu-latest
Expand Down Expand Up @@ -530,6 +584,10 @@ jobs:
musl: musllinux
- os: ubuntu-24.04-arm
musl: musllinux
- os: ubuntu-latest
platform: android
- os: macos-14
platform: ios
steps:
- name: Checkout
uses: actions/checkout@v6
Expand Down Expand Up @@ -575,14 +633,19 @@ jobs:
- name: Build wheels
uses: pypa/cibuildwheel@v3.4.0
env:
CIBW_PLATFORM: ${{ matrix.platform || 'auto' }}
CIBW_SKIP: pp* ${{ matrix.musl == 'musllinux' && '*manylinux*' || '*musllinux*' }}
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_ARCHS_IOS: arm64_iphoneos arm64_iphonesimulator x86_64_iphonesimulator
CIBW_ARCHS_ANDROID: arm64_v8a x86_64
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: >-
dist-${{ matrix.os }}-${{ matrix.musl }}-${{
matrix.qemu
matrix.platform
&& matrix.platform
|| matrix.qemu
&& matrix.qemu
|| 'native'
}}
Expand Down
1 change: 1 addition & 0 deletions CHANGES/11750.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added wheels for Android and iOS platforms -- by :user:`timrid`.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ dynamic = [

[project.optional-dependencies]
speedups = [
"aiodns >= 3.3.0",
"Brotli >= 1.2; platform_python_implementation == 'CPython'",
"aiodns >= 3.3.0; sys_platform != 'android' and sys_platform != 'ios'",
Copy link
Member

@Dreamsorcerer Dreamsorcerer Mar 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could make a PR to pycares to support this, we could probably get this resolved pretty quick. Unless there's a technical difficulty in supporting these platforms?

"Brotli >= 1.2; platform_python_implementation == 'CPython' and sys_platform != 'android' and sys_platform != 'ios'",
"brotlicffi >= 1.2; platform_python_implementation != 'CPython'",
"backports.zstd; platform_python_implementation == 'CPython' and python_version < '3.14'",
"backports.zstd; platform_python_implementation == 'CPython' and python_version < '3.14' and sys_platform != 'android' and sys_platform != 'ios'",
]

[[project.maintainers]]
Expand Down
6 changes: 3 additions & 3 deletions requirements/base-ft.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
#
# pip-compile --allow-unsafe --output-file=requirements/base-ft.txt --strip-extras requirements/base-ft.in
#
aiodns==4.0.0
aiodns==4.0.0 ; sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
aiohappyeyeballs==2.6.1
# via -r requirements/runtime-deps.in
aiosignal==1.4.0
# via -r requirements/runtime-deps.in
async-timeout==5.0.1 ; python_version < "3.11"
# via -r requirements/runtime-deps.in
backports-zstd==1.3.0 ; platform_python_implementation == "CPython" and python_version < "3.14"
backports-zstd==1.3.0 ; platform_python_implementation == "CPython" and python_version < "3.14" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
brotli==1.2.0 ; platform_python_implementation == "CPython"
brotli==1.2.0 ; platform_python_implementation == "CPython" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
cffi==2.0.0
# via pycares
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-r runtime-deps.in

gunicorn
uvloop; platform_system != "Windows" and implementation_name == "cpython" # MagicStack/uvloop#14
uvloop; platform_system != "Windows" and implementation_name == "cpython" and sys_platform != 'android' and sys_platform != 'ios' # MagicStack/uvloop#14
winloop; platform_system == "Windows" and implementation_name == "cpython"
8 changes: 4 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
#
# pip-compile --allow-unsafe --output-file=requirements/base.txt --strip-extras requirements/base.in
#
aiodns==4.0.0
aiodns==4.0.0 ; sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
aiohappyeyeballs==2.6.1
# via -r requirements/runtime-deps.in
aiosignal==1.4.0
# via -r requirements/runtime-deps.in
async-timeout==5.0.1 ; python_version < "3.11"
# via -r requirements/runtime-deps.in
backports-zstd==1.3.0 ; platform_python_implementation == "CPython" and python_version < "3.14"
backports-zstd==1.3.0 ; platform_python_implementation == "CPython" and python_version < "3.14" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
brotli==1.2.0 ; platform_python_implementation == "CPython"
brotli==1.2.0 ; platform_python_implementation == "CPython" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
cffi==2.0.0
# via pycares
Expand Down Expand Up @@ -45,7 +45,7 @@ typing-extensions==4.15.0 ; python_version < "3.13"
# -r requirements/runtime-deps.in
# aiosignal
# multidict
uvloop==0.21.0 ; platform_system != "Windows" and implementation_name == "cpython"
uvloop==0.21.0 ; platform_system != "Windows" and implementation_name == "cpython" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/base.in
yarl==1.22.0
# via -r requirements/runtime-deps.in
63 changes: 38 additions & 25 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --allow-unsafe --output-file=requirements/constraints.txt --strip-extras requirements/constraints.in
#
aiodns==4.0.0
aiodns==4.0.0 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/lint.in
# -r requirements/runtime-deps.in
Expand All @@ -28,18 +28,19 @@ backports-zstd==1.3.0 ; implementation_name == "cpython"
# via
# -r requirements/lint.in
# -r requirements/runtime-deps.in
blockbuster==1.5.26
blockbuster==1.5.26 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/lint.in
# -r requirements/test-common.in
brotli==1.2.0 ; platform_python_implementation == "CPython"
brotli==1.2.0 ; platform_python_implementation == "CPython" and sys_platform != "android" and sys_platform != "ios"
# via -r requirements/runtime-deps.in
build==1.4.0
# via pip-tools
certifi==2026.2.25
# via requests
cffi==2.0.0
cffi==2.0.0 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/test-common.in
# cryptography
# pycares
# pytest-codspeed
Expand All @@ -54,11 +55,11 @@ click==8.3.1
# towncrier
# wait-for-it
coverage==7.13.4
# via pytest-cov
cryptography==46.0.5 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/test-common.in
# pytest-cov
cryptography==46.0.5
# via trustme
# trustme
cython==3.2.4
# via -r requirements/cython.in
distlib==0.4.0
Expand All @@ -73,8 +74,10 @@ filelock==3.25.2
# via
# python-discovery
# virtualenv
forbiddenfruit==0.1.4
# via blockbuster
forbiddenfruit==0.1.4 ; implementation_name == "cpython" and sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/test-common.in
# blockbuster
freezegun==1.5.5
# via
# -r requirements/lint.in
Expand All @@ -96,16 +99,18 @@ imagesize==2.0.0
# via sphinx
iniconfig==2.3.0
# via pytest
isal==1.7.2 ; python_version < "3.14"
isal==1.7.2 ; python_version < "3.14" and sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/lint.in
# -r requirements/test-common.in
jinja2==3.1.6
# via
# sphinx
# towncrier
librt==0.8.0
# via mypy
librt==0.8.0 ; platform_python_implementation != "PyPy" and sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/test-common.in
# mypy
markdown-it-py==4.0.0
# via rich
markupsafe==3.0.3
Expand All @@ -121,8 +126,10 @@ mypy==1.19.1 ; implementation_name == "cpython"
# via
# -r requirements/lint.in
# -r requirements/test-common.in
mypy-extensions==1.1.0
# via mypy
mypy-extensions==1.1.0 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/test-common.in
# mypy
nodeenv==1.10.0
# via pre-commit
packaging==26.0
Expand Down Expand Up @@ -156,14 +163,20 @@ proxy-py==2.4.10
# via
# -r requirements/lint.in
# -r requirements/test-common.in
pycares==5.0.1
# via aiodns
pycares==5.0.1 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/test-common.in
# aiodns
pycparser==3.0
# via cffi
pydantic==2.12.5
# via python-on-whales
pydantic-core==2.41.5
# via pydantic
pydantic==2.12.5 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/test-common.in
# python-on-whales
pydantic-core==2.41.5 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/test-common.in
# pydantic
pyenchant==3.3.0
# via sphinxcontrib-spelling
pygments==2.19.2
Expand All @@ -183,7 +196,7 @@ pytest==9.0.2
# pytest-cov
# pytest-mock
# pytest-xdist
pytest-codspeed==4.3.0
pytest-codspeed==4.3.0 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/lint.in
# -r requirements/test-common.in
Expand All @@ -193,13 +206,13 @@ pytest-mock==3.15.1
# via
# -r requirements/lint.in
# -r requirements/test-common.in
pytest-xdist==3.8.0
pytest-xdist==3.8.0 ; sys_platform != "android" and sys_platform != "ios"
# via -r requirements/test-common.in
python-dateutil==2.9.0.post0
# via freezegun
python-discovery==1.1.3
# via virtualenv
python-on-whales==0.81.0
python-on-whales==0.81.0 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/lint.in
# -r requirements/test-common.in
Expand Down Expand Up @@ -254,7 +267,7 @@ towncrier==25.8.0
# via
# -r requirements/doc.in
# sphinxcontrib-towncrier
trustme==1.2.1 ; platform_machine != "i686"
trustme==1.2.1 ; platform_machine != "i686" and sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/lint.in
# -r requirements/test-common.in
Expand Down Expand Up @@ -289,7 +302,7 @@ wheel==0.46.3
# via pip-tools
yarl==1.22.0
# via -r requirements/runtime-deps.in
zlib-ng==1.0.0
zlib-ng==1.0.0 ; sys_platform != "android" and sys_platform != "ios"
# via
# -r requirements/lint.in
# -r requirements/test-common.in
Expand Down
Loading
Loading