Skip to content

Commit

Permalink
WIP: cross compile for MacOS targets
Browse files Browse the repository at this point in the history
  • Loading branch information
kylc committed Dec 17, 2023
1 parent 2ad3d87 commit 0ae3dc5
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,19 @@ on: [push, pull_request, workflow_dispatch]

jobs:
build_wheels:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64
- os: macos-latest
target: x86_64
- target: x86_64-unknown-linux-gnu
- target: x86_64-apple-darwin
args: --zig
- target: aarch64-apple-darwin
args: --zig

steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
- name: symlink gfortran (macOS)
if: runner.os == 'macOS'
run: |
ln -s /usr/local/bin/gfortran-12 /usr/local/bin/gfortran
gfortran --version
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v4
with:
Expand All @@ -32,15 +26,11 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
args: ${{ matrix.args }} --release --out dist
manylinux: auto
sccache: true
- name: delocate wheel (macOS)
if: runner.os == 'macOS'
run: |
pip install delocate
delocate-wheel -v dist/*.whl
- name: install built wheel
if: ${{ matrix.target }} == 'x86_64-unknown-linux-gnu'
run: |
pip install optik-py --no-index --find-links dist
python -c "import optik"
Expand Down

0 comments on commit 0ae3dc5

Please sign in to comment.