Skip to content

Commit

Permalink
Build sphericart-torch wheels on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Jan 9, 2025
1 parent e86108d commit dabb314
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/build-torch-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
arch: ["x86_64"]
pytorch-version: ["2.4", "2.5"]
arch: ["arm64", "x86_64"]
os: ["ubuntu-22.04", "macos-14"]
exclude:
# remove mismatched arch/os pairs
- {os: macos-14, arch: x86_64}
- {os: ubuntu-22.04, arch: arm64}

name: "Torch ${{matrix.pytorch-version}} ${{matrix.os}} ${{matrix.arch}}"

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

- name: Build custom manylinux Docker Image with CUDA
if: matrix.os == 'ubuntu-22.04'
run: |
docker build --no-cache \
-t sphericart_manylinux2014_"${{ matrix.arch }}" \
Expand Down Expand Up @@ -55,6 +61,10 @@ jobs:
--exclude libtorch_cuda.so \
--exclude libc10_cuda.so \
-w {dest_dir} {wheel}
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
delocate-wheel --ignore-missing-dependencies \
--require-archs {delocate_archs} \
-w {dest_dir} -v {wheel}
CIBW_ENVIRONMENT: >
SPHERICART_ARCH_NATIVE=OFF
SPHERICART_NO_LOCAL_DEPS=1
Expand All @@ -68,14 +78,17 @@ jobs:

merge-torch-wheels:
needs: build-torch-wheels
runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04
name: merge wheels for ${{ matrix.name }}
strategy:
matrix:
include:
- name: x86_64 Linux
os: ubuntu-22.04
arch: x86_64
- name: arm64 macOS
os: macos-14
arch: arm64
steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit dabb314

Please sign in to comment.