From d402f44dfba4d056eff1778f38bd03a8cb9ba2f4 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 16 Mar 2024 17:48:54 +0000 Subject: [PATCH] Build macOS arm64 wheels on GitHub Actions instead of Cirrus CI --- .cirrus.yml | 25 ------------------------- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 25 deletions(-) delete mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 0abb27d..0000000 --- a/.cirrus.yml +++ /dev/null @@ -1,25 +0,0 @@ -macos_instance: - image: ghcr.io/cirruslabs/macos-ventura-xcode:latest - -tests_task: - install_python_script: brew install python@3.11 - - install_tox_and_virtualenv_script: python3 -m pip install tox virtualenv - - make_jq_c_script: make jq.c - - run_tests_script: python3 -m tox -e py - -wheels_task: - env: - CIBW_ARCHS_MACOS: arm64 - CIBW_SKIP: cp38-macosx_arm64 - - install_python_script: brew install python@3.11 - - install_cibuildwheel_script: python3 -m pip install cibuildwheel==2.17.0 - - build_wheels_script: python3 -m cibuildwheel - - wheels_artifacts: - path: ./wheelhouse/*.whl diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b34df2a..c544db7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,3 +140,38 @@ jobs: if: ${{ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) || matrix.cibw-only == 'cp310-manylinux_x86_64' }} with: path: ./wheelhouse/*.whl + + build_wheels_macosx_arm64: + name: Build macOS arm64 wheels + + runs-on: macos-14 + + steps: + + - uses: actions/checkout@v4 + + - name: Use Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Print build identifiers + run: | + python -m pip install cibuildwheel==2.17.0 + CIBW_SKIP=cp38-macosx_arm64 python -m cibuildwheel --print-build-identifiers + + - name: Build wheels + if: ${{ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) }} + uses: pypa/cibuildwheel@v2.17.0 + env: + CIBW_SKIP: cp38-macosx_arm64 + + - name: Build wheels + if: ${{ !(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) }} + uses: pypa/cibuildwheel@v2.17.0 + with: + only: cp310-macosx_arm64 + + - uses: actions/upload-artifact@v4 + with: + path: ./wheelhouse/*.whl