Skip to content

Commit

Permalink
add macos_x86_64 action
Browse files Browse the repository at this point in the history
  • Loading branch information
shaoxc committed Dec 5, 2023
1 parent 4870102 commit b23f1e6
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/macos_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60
timeout-minutes: 0

- uses: actions/upload-artifact@v3
with:
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/macos_x86.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build wheels on Macos-x86_64

on:
push:
branches:
- action
pull_request:
branches:
- action

jobs:
build_wheels_macos_x86_64:
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
fail-fast: false
matrix:
buildplat:
- [macos-latest, macosx, x86_64]
python: ["cp39"]
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Build wheels on macos
if: ${{ matrix.buildplat[1] == 'macosx' && matrix.buildplat[2] == 'x86_64' }}
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}*
CIBW_BUILD_VERBOSITY: 3
CIBW_ENVIRONMENT: FFLAGS='-fPIC -fallow-argument-mismatch' SETUPTOOLS_USE_DISTUTILS=stdlib CPP='gcc -E'
CIBW_ENVIRONMENT_PASS_LINUX: FFLAGS SETUPTOOLS_USE_DISTUTILS CPP
CIBW_ARCHS_MACOS: "x86_64"
CIBW_BEFORE_BUILD: |
brew install gfortran && brew unlink gfortran && brew link gfortran
brew install openblas lapack
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 0

- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}
path: ./wheelhouse/*.whl

0 comments on commit b23f1e6

Please sign in to comment.