diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..80a171d52 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,83 @@ +version: 2.1 + +jobs: + arm-wheels: + parameters: + build: + type: string + + machine: + image: ubuntu-2004:2022.04.1 + resource_class: arm.medium + + environment: + CIBW_BEFORE_ALL_LINUX: "bash tools/install_libzmq.sh" + CIBW_ENVIRONMENT_LINUX: >- + ZMQ_PREFIX=/usr/local + CFLAGS=-Wl,-strip-all + CXXFLAGS=-Wl,-strip-all + CIBW_TEST_REQUIRES: "pytest" + CIBW_TEST_COMMAND: "pytest -vsx {package}/tools/test_wheel.py" + CIBW_ARCHS: "aarch64" + CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux2014_aarch64 + CIBW_MUSLLINUX_AARCH64_IMAGE: quay.io/pypa/musllinux_1_1_aarch64 + CIBW_BUILD: "<< parameters.build >>" + + steps: + - checkout + - run: + name: install cibuildwheel + command: | + python3 -m pip install --upgrade pip setuptools + python3 -m pip install -r tools/wheel-requirements.txt + + - run: + name: pip freeze + command: | + python3 -m pip freeze + + - run: + name: Cython + # This assumes pytest is installed via the install-package step above + command: | + python3 setup.py fetch_libzmq + python3 setup.py cython + + - run: + name: list wheels + command: | + python3 -m cibuildwheel . --print-build-identifiers + + - run: + name: cibuildwheel + command: | + python3 -m cibuildwheel . + + - store_artifacts: + path: wheelhouse/ + + - when: + condition: + matches: + pattern: ".+" + value: "<< pipeline.git.tag >>" + steps: + - run: + environment: + TWINE_NONINTERACTIVE: "1" + TWINE_USERNAME: __token__ + TWINE_PASSWORD: $TWINE_PASSWORD + command: | + python3 -m pip install twine + twine upload --skip-existing wheelhouse/* + +workflows: + wheels: # This is the name of the workflow, feel free to change it to better match your workflow. + # Inside the workflow, you define the jobs you want to run. + jobs: + - arm-wheels: + matrix: + parameters: + build: + - "*manylinux*" + - "*musllinux*" diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e8738eca3..a3960aee1 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -16,8 +16,6 @@ on: - zmq/utils/*.h env: - cython: "0.29.30" - cibuildwheel: "2.5.0" TWINE_NONINTERACTIVE: "1" jobs: @@ -48,7 +46,7 @@ jobs: - name: install dependencies run: | pip install --upgrade pip build - pip install cython=="${{ env.cython }}" + pip install -r tools/wheel-requirements.txt - name: build sdist run: | @@ -99,7 +97,6 @@ jobs: CIBW_SKIP: "${{ matrix.cibw.skip || '' }}" CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}" CIBW_MANYLINUX_I686_IMAGE: "${{ matrix.cibw.manylinux_image }}" - CIBW_MANYLINUX_AARCH64_IMAGE: "${{ matrix.cibw.manylinux_image }}" CIBW_ARCHS_LINUX: "${{ matrix.cibw.arch || 'auto' }}" CIBW_ARCHS_MACOS: "${{ matrix.cibw.arch || 'auto' }}" @@ -150,46 +147,6 @@ jobs: cibw: skip: "*manylinux*" - - os: ubuntu-20.04 - name: cp36-manylinux_aarch64 - cibw: - build: "cp36*" - skip: "*musllinux*" - manylinux_image: manylinux2014 - arch: aarch64 - - - os: ubuntu-20.04 - name: cp37-manylinux_aarch64 - cibw: - build: "cp37*" - skip: "*musllinux*" - manylinux_image: manylinux2014 - arch: aarch64 - - - os: ubuntu-20.04 - name: cp38-manylinux_aarch64 - cibw: - build: "cp38*" - skip: "*musllinux*" - manylinux_image: manylinux2014 - arch: aarch64 - - - os: ubuntu-20.04 - name: cp39-manylinux_aarch64 - cibw: - build: "cp39*" - skip: "*musllinux*" - manylinux_image: manylinux2014 - arch: aarch64 - - - os: ubuntu-20.04 - name: cp310-manylinux_aarch64 - cibw: - build: "cp310*" - skip: "*musllinux*" - manylinux_image: manylinux2014 - arch: aarch64 - - os: windows-2019 name: win32 architecture: x86 @@ -227,19 +184,6 @@ jobs: echo 'CIBW_REPAIR_WHEEL_COMMAND_WINDOWS=' >> "$GITHUB_ENV" echo 'CIBW_ENVIRONMENT_WINDOWS=' >> "$GITHUB_ENV" - - name: register qemu - if: contains(matrix.cibw.arch, 'aarch64') - run: | - docker run --rm --privileged hypriot/qemu-register:v4.2.0 - - - name: customize aarch64 - if: contains(matrix.cibw.arch, 'aarch64') - # install zeromq-devel because building libzmq for arm takes too long - # it's not in default packages, but it is in epel-7 - # this will be an older release than than other wheels - run: | - echo 'CIBW_BEFORE_ALL_LINUX=yum -y install epel-release && yum -y install zeromq-devel' >> "$GITHUB_ENV" - - name: customize mac-arm-64 if: contains(matrix.os, 'macos') && matrix.cibw.arch run: | @@ -250,12 +194,12 @@ jobs: - name: install dependencies run: | pip install --upgrade setuptools pip wheel - pip install cibuildwheel=="${{ env.cibuildwheel }}" cython=="${{ env.cython }}" + pip install -r tools/wheel-requirements.txt + - name: install windows dependencies if: startsWith(matrix.os, 'win') run: | - pip install delvewheel==0.0.12 python setup.py fetch_libzmq --dll xcopy /i libzmq-dll C:\\libzmq-dll diff --git a/tools/wheel-requirements.txt b/tools/wheel-requirements.txt new file mode 100644 index 000000000..11706e997 --- /dev/null +++ b/tools/wheel-requirements.txt @@ -0,0 +1,3 @@ +cibuildwheel==2.8.1 +cython==0.29.30 +delvewheel==0.0.22; sys_platform == 'win32'