diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60f7e495f..2faeccb88 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,7 @@ env: jobs: test: + if: "false" runs-on: ${{ matrix.os }} timeout-minutes: 20 continue-on-error: ${{ matrix.zmq == 'head' || matrix.python == '3.14' }} diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 75eb7478c..e7f622ad7 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -73,78 +73,15 @@ jobs: fail-fast: false matrix: include: - - os: macos-13 - name: mac-pypy + - os: macos-15 + name: ios cibw: - build: "pp*" + platform: "ios" - - os: macos-14 - name: mac-cpython - cibw: - arch: universal2 - build: "cp*" - - - name: manylinux-x86_64 - cibw: - arch: x86_64 - build: "*manylinux*" - - - name: manylinux-i686 - cibw: - arch: i686 - build: "*manylinux*" - - - name: manylinux-arm - os: ubuntu-24.04-arm - cibw: - build: "*manylinux*" - - # additional manylinux variants, not specified in pyproject.toml: - # this is where we would add e.g. older manylinux_2014 builds - # - name: manylinux-x86_64-2014 + # - os: macos-13 + # name: mac-pypy # cibw: - # arch: x86_64 - # build: "cp31*-manylinux* pp39-manylinux*" - # manylinux_x86_64_image: manylinux_2_28 - - - name: musllinux - cibw: - arch: auto,auto32 - build: "*musllinux*" - - - name: musllinux-arm - os: ubuntu-24.04-arm - cibw: - build: "*musllinux*" - - - name: android - os: ubuntu-24.04 - cibw: - platform: android - arch: all - - - name: win32 - os: windows-2022 - architecture: x86 - cibw: - build: "cp*win32" - - - os: windows-2022 - name: win-pypy - architecture: x64 - cibw: - build: "pp*win_amd64" - - - os: windows-2022 - name: win_amd64 - architecture: x64 - cibw: - build: "cp*win_amd64" - - - os: windows-11-arm - name: win_arm64 - cibw: - arch: ARM64 + # build: "pp*" steps: - uses: actions/checkout@v4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c58cb7c4..e1bbb1721 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -282,7 +282,11 @@ if (ZMQ_PREFIX STREQUAL "bundled") ) # add --host for cross compiling - message(STATUS "Cross: ${CMAKE_CROSSCOMPILING} $ENV{CIBW_HOST_TRIPLET}") + message(STATUS "Checking cross compilation config: cross=${CMAKE_CROSSCOMPILING} host=$ENV{CIBW_HOST_TRIPLET}") + if(IOS AND NOT ENV{CIBW_HOST_TRIPLET}) + message(STATUS "Guessing host triplet arm64-apple-ios for cross compilation") + set(ENV{CIBW_HOST_TRIPLET} "arm64-apple-ios") + endif() if(CMAKE_CROSSCOMPILING AND DEFINED ENV{CIBW_HOST_TRIPLET}) message(STATUS "Cross compiling libsodium for host: $ENV{CIBW_HOST_TRIPLET}") list(APPEND libsodium_configure "--host=$ENV{CIBW_HOST_TRIPLET}") diff --git a/pyproject.toml b/pyproject.toml index 4f52008b0..df54dc513 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -186,6 +186,16 @@ repair-wheel-command = "delocate-wheel --sanitize-rpaths --require-archs {deloca ZMQ_PREFIX = "/tmp/zmq" MACOSX_DEPLOYMENT_TARGET = "10.15" +[tool.cibuildwheel.ios] +# need cmake >=4 for https://github.com/pypa/cibuildwheel/issues/2435 +before-all = "brew upgrade cmake" +xbuild-tools = ["cmake", "ninja"] + +[tool.cibuildwheel.ios.config-settings] +"cmake.define.ZMQ_PREFIX" = "bundled" +"cmake.define.CMAKE_SYSTEM_NAME" = "iOS" +"cmake.define.CMAKE_SYSTEM_VERSION" = "13" + [tool.cibuildwheel.windows] before-all = "python buildutils/bundle.py licenses" repair-wheel-command = """\ diff --git a/tools/install_libzmq.sh b/tools/install_libzmq.sh index 238b8c63b..4cec4cd09 100644 --- a/tools/install_libzmq.sh +++ b/tools/install_libzmq.sh @@ -1,13 +1,20 @@ #!/usr/bin/env bash # script to install libzmq/libsodium for use in wheels +echo $PATH +env | grep CIBW +env | grep -I ios +env | grep MAC +env | grep SDK + set -ex + LIBSODIUM_VERSION=$(python buildutils/bundle.py libsodium) LIBZMQ_VERSION=$(python buildutils/bundle.py) PYZMQ_DIR="$PWD" LICENSE_DIR="$PYZMQ_DIR/licenses" test -d "$LICENSE_DIR" || mkdir "$LICENSE_DIR" SHLIB_EXT=".so" -if [[ "$(uname)" == "Darwin" ]]; then +if [[ "$(uname)" == "Darwin" && "${CIBW_PLATFORM:-macos}" == "macos" ]]; then SHLIB_EXT=".dylib" # make sure deployment target is set echo "${MACOSX_DEPLOYMENT_TARGET=}" @@ -33,7 +40,7 @@ if [[ "$(uname)" == "Darwin" ]]; then exit 1 ;; esac - echo "building libzmq for mac ${ARCHS}" + echo "building libzmq for ${CIBW_PLATFORM:-macos} ${ARCHS}" export CXX="${CC:-clang++}" for arch in ${ARCHS}; do # seem to need ARCH in CXX for libtool @@ -42,6 +49,9 @@ if [[ "$(uname)" == "Darwin" ]]; then export CXXFLAGS="-arch ${arch} ${CXXFLAGS:-}" export LDFLAGS="-arch ${arch} ${LDFLAGS:-}" done +elif [[ "${CIBW_PLATFORM:-}" == "ios" ]]; then + echo "building libzmq for ${CIBW_PLATFORM}" + SHLIB_EXT=".dylib" fi PREFIX="${ZMQ_PREFIX:-/usr/local}"