Skip to content

Commit

Permalink
build_wheels_macos: enable build_wheels_macos_arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
cauliyang committed Oct 31, 2023
1 parent 5d75d54 commit 8210923
Showing 1 changed file with 4 additions and 58 deletions.
62 changes: 4 additions & 58 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,14 @@ jobs:
build_wheels_macos:
name: "${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}"
runs-on: ${{ matrix.os }}
# needs: ["release"]
# if: needs.release.outputs.tag
needs: ["release"]
if: needs.release.outputs.tag

strategy:
fail-fast: false
matrix:
os: [macos-latest]
# cibw_build: ["cp39-*", "cp310-*", "cp311-*"]
cibw_build: ["cp39-*"]
cibw_build: ["cp39-*", "cp310-*", "cp311-*"]
cibw_archs: ["x86_64"]
env:
SYSTEM_VERSION_COMPAT: 0 # https://github.com/actions/setup-python/issues/469#issuecomment-1192522949
Expand Down Expand Up @@ -156,61 +155,8 @@ jobs:
with:
path: wheelhouse/*.whl

build_wheels_macos_arm64:
name: "${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}"
runs-on: ${{ matrix.os }}
# needs: ["release"]
# if: needs.release.outputs.tag
strategy:
matrix:
os: [macos-latest]
# cibw_build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*"]
cibw_build: ["cp39-*"]
cibw_archs: ["arm64"]

steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Configure Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Install Dependencies
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Do not run brew cleanup automatically.
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 # Do not automatically update packages.
run: |
brew install openssl@3
ln -sf $(brew --prefix openssl)/include/openssl /usr/local/include/openssl
ln -sf $(brew --prefix openssl)/lib/*a /usr/local/lib/
ln -sf $(brew --prefix openssl)/lib/*dylib /usr/local/lib/
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_SKIP: "*-macosx_arm64"

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

upload_to_pypi:
needs:
[
"release",
"build_wheels_macos_arm64",
"build_wheels_macos",
"build_wheels_linux",
]
needs: ["release", "build_wheels_macos", "build_wheels_linux"]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
Expand Down

0 comments on commit 8210923

Please sign in to comment.