From 344d3e584520cead54ff8b830d372e7ad533134a Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 12 Oct 2022 09:23:43 +0200 Subject: [PATCH 1/4] pyzmq uses circleci for native arm builds --- docs/data/projects.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/data/projects.yml b/docs/data/projects.yml index 5129dbb6e..7033357b1 100644 --- a/docs/data/projects.yml +++ b/docs/data/projects.yml @@ -172,11 +172,13 @@ - name: pyzmq gh: zeromq/pyzmq - ci: [github] + ci: [github, circleci] os: [windows, apple, linux] ci_config: .github/workflows/wheels.yml notes: | - Python bindings for zeromq, the networking library. Uses Cython and CFFI. + Python bindings for zeromq, the networking library. + Uses Cython on CPython and CFFI on PyPy. + ARM wheels for linux are built natively on CircleCI. - name: python-rapidjson gh: python-rapidjson/python-rapidjson From ea535dca43648b4b8e288a71de6b8f0bf2a53fe7 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 12 Oct 2022 09:23:58 +0200 Subject: [PATCH 2/4] add native arm builds to circleci-minimal example --- examples/circleci-minimal.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/examples/circleci-minimal.yml b/examples/circleci-minimal.yml index e42df8d66..796daa270 100644 --- a/examples/circleci-minimal.yml +++ b/examples/circleci-minimal.yml @@ -16,6 +16,23 @@ jobs: - store_artifacts: path: wheelhouse/ + linux-aarch64-wheels: + working_directory: ~/linux-aarch64-wheels + machine: + image: ubuntu-2004:2022.04.1 + # resource_class is what tells CircleCI to use an ARM worker for native arm builds + # https://circleci.com/product/features/resource-classes/ + resource_class: arm.medium + steps: + - checkout + - run: + name: Build the Linux aarch64 wheels. + command: | + python3 -m pip install --user cibuildwheel==2.10.2 + python3 -m cibuildwheel --output-dir wheelhouse + - store_artifacts: + path: wheelhouse/ + osx-wheels: working_directory: ~/osx-wheels macos: @@ -35,4 +52,5 @@ workflows: all-tests: jobs: - linux-wheels + - linux-aarch64-wheels - osx-wheels From b34af8dcc7f5e0e58bc548487f89cc6594f47375 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 12 Oct 2022 09:31:45 +0200 Subject: [PATCH 3/4] README: circleci supports linux arm --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03d71f9bf..19757bb1c 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Usage | Azure Pipelines | ✅ | ✅ | ✅ | | ✅² | ✅⁴ | | Travis CI | ✅ | | ✅ | ✅ | | | | AppVeyor | ✅ | ✅ | ✅ | | ✅² | ✅⁴ | -| CircleCI | ✅ | ✅ | | | ✅² | | +| CircleCI | ✅ | ✅ | | ✅ | ✅² | | | Gitlab CI | ✅ | | | | | | | Cirrus CI | ✅ | ✅³ | ✅ | ✅ | ✅ | | From 4c3062199e891c26727046c283a09d4d31ef0b9e Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 12 Oct 2022 13:43:05 +0200 Subject: [PATCH 4/4] add linux-aarch64 to circleci tests --- .circleci/config.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a657f7e7..86ecaad7a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,9 +37,30 @@ jobs: command: venv/bin/python ./bin/run_tests.py no_output_timeout: 30m + linux-aarch64: + machine: + image: ubuntu-2004:2022.04.1 + resource_class: arm.medium + environment: + PYTHON: python3 + # Temporarily restrict the tests that are run on CircleCI to prevent + # test timeouts. + PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images" + steps: + - checkout + + - run: + name: Prepare the environment. + command: bash .circleci/prepare.sh + - run: + name: Test. + command: venv/bin/python ./bin/run_tests.py + no_output_timeout: 30m + workflows: version: 2 all-tests: jobs: - osx-python3.9 - linux-python3.9 + - linux-aarch64