Skip to content

Commit

Permalink
Try macos runners (#783)
Browse files Browse the repository at this point in the history
This should let us build wheels across both mac architectures for now.
  • Loading branch information
lancetarn authored Nov 21, 2023
1 parent cc4bfa3 commit b02a953
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
REDIS_URL: redis://localhost:6379/0

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade packaging tools
Expand Down Expand Up @@ -99,8 +99,8 @@ jobs:
REDIS_URL: redis://localhost:6379/0

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade packaging tools
Expand Down
29 changes: 27 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# For cross-architecture builds
# https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build binary wheels
Expand All @@ -51,6 +51,31 @@ jobs:
with:
path: ./wheelhouse/*.whl

build_macos_wheels:
name: Build macos wheels (cross-compiles arm64)
runs-on: macos-11
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.10"

- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip cibuildwheel
- name: Build binary wheels
env:
CIBW_SKIP: "pp38-* pp39-* pp310-* pp311-*"
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS_MACOS: "x86_64 arm64"
run: python -m cibuildwheel

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_pure_wheels:
name: Build pure python wheels
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -96,7 +121,7 @@ jobs:
path: dist/*.tar.gz

upload_pypi:
needs: [cibuildwheel_py38plus, build_pure_wheels, build_sdist]
needs: [cibuildwheel_py38plus, build_pure_wheels, build_sdist, build_macos_wheels]
runs-on: ubuntu-20.04
steps:
- name: Download distributions for publishing.
Expand Down

0 comments on commit b02a953

Please sign in to comment.