Skip to content

Commit

Permalink
[SymForce-External] Fix cibuildwheel install
Browse files Browse the repository at this point in the history
Fix cibuildwheel install

Tested here:
https://github.com/symforce-org/symforce/actions/runs/8825204595

Closes #388

GitOrigin-RevId: 09624f4e2c3dc05036c85dc693852be841487b9c
  • Loading branch information
aaron-skydio committed May 8, 2024
1 parent bd60d57 commit b667322
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 36 deletions.
17 changes: 0 additions & 17 deletions .github/scripts/mac_install_gmp.sh

This file was deleted.

36 changes: 17 additions & 19 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,64 +26,62 @@ jobs:
path: dist/*

build-macos:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os.runner }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
os:
- runner: macos-13
arch: x86_64
- runner: macos-latest
arch: arm64
python-version: [cp38, cp39, cp310, cp311, cp312]
arch: [x86_64, arm64]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install cibuildwheel
run: python3 -m pip install cibuildwheel==2.16.5

- name: Build wheels
run: python3 -m cibuildwheel --output-dir wheelhouse
uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_BUILD: ${{ matrix.python-version }}-*
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
CIBW_ARCHS_MACOS: ${{ matrix.os.arch }}
CIBW_BUILD_FRONTEND: build
GMP_ROOT: /Users/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/arm-homebrew/opt/gmp
CIBW_BEFORE_BUILD: ./.github/scripts/mac_install_gmp.sh
# For arm64; for x86, it's at /usr/local but cmake finds that ok already
GMP_ROOT: /opt/homebrew
CIBW_BEFORE_BUILD: brew install gmp
CIBW_ENVIRONMENT: SYMFORCE_REWRITE_LOCAL_DEPENDENCIES=True

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: symforce-wheels-macos-${{ matrix.python-version }}-${{ matrix.arch }}
name: symforce-wheels-${{ matrix.os.arch }}-${{ matrix.python-version }}
path: wheelhouse/*.whl

build-linux:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [cp38, cp39, cp310, cp311, cp312]
arch: [x86_64]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install cibuildwheel
run: python3 -m pip install cibuildwheel==2.16.5

- name: Build wheels
run: python3 -m cibuildwheel --output-dir wheelhouse
uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_BUILD: ${{ matrix.python-version }}-manylinux_${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.python-version }}-manylinux_x86_64
CIBW_BUILD_FRONTEND: build
CIBW_BEFORE_BUILD: yum install -y gmp-devel git
CIBW_ENVIRONMENT: SYMFORCE_REWRITE_LOCAL_DEPENDENCIES=True

- name: Upload Wheels
uses: actions/upload-artifact@v4
with:
name: symforce-wheels-linux-${{ matrix.python-version }}
name: symforce-wheels-${{ matrix.os }}-${{ matrix.python-version }}
path: wheelhouse/*.whl

merge-wheel-artifacts:
Expand Down

0 comments on commit b667322

Please sign in to comment.