-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |