Skip to content

Commit

Permalink
add macos universal wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
fishjojo committed Jul 27, 2024
1 parent 62d867b commit 557598e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
76 changes: 38 additions & 38 deletions .github/workflows/publish_pyscfadlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@ jobs:
with:
packages-dir: pyscfadlib/wheelhouse

build_wheel_macos_x86:
name: Build macos_x86 wheels
runs-on: macos-12

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/[email protected]
env:
CMAKE_CONFIGURE_ARGS: "-DWITH_F12=OFF"
with:
package-dir: pyscfadlib
output-dir: pyscfadlib/wheelhouse
config-file: "{package}/pyproject.toml"

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw_wheels_macos_x86
path: pyscfadlib/wheelhouse/*.whl
overwrite: true
#build_wheel_macos_x86:
# name: Build macos_x86 wheels
# runs-on: macos-12

# steps:
# - uses: actions/checkout@v4

# - name: Build wheels
# uses: pypa/[email protected]
# env:
# CMAKE_CONFIGURE_ARGS: "-DWITH_F12=OFF"
# with:
# package-dir: pyscfadlib
# output-dir: pyscfadlib/wheelhouse
# config-file: "{package}/pyproject.toml"

# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: cibw_wheels_macos_x86
# path: pyscfadlib/wheelhouse/*.whl
# overwrite: true

build_wheel_macos_arm64:
name: Build macos_arm64 wheels
Expand All @@ -80,26 +80,26 @@ jobs:
path: pyscfadlib/wheelhouse/*.whl
overwrite: true

publish_pypi_macos_x86:
name: publish macos_x86 wheels to pypi
needs: build_wheel_macos_x86
runs-on: ubuntu-latest
#publish_pypi_macos_x86:
# name: publish macos_x86 wheels to pypi
# needs: build_wheel_macos_x86
# runs-on: ubuntu-latest

environment: release
permissions:
id-token: write
# environment: release
# permissions:
# id-token: write

steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
name: cibw_wheels_macos_x86
path: dist
# steps:
# - name: Download wheels
# uses: actions/download-artifact@v4
# with:
# name: cibw_wheels_macos_x86
# path: dist

- run: ls -R dist
# - run: ls -R dist

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1

publish_pypi_macos_arm64:
name: publish macos_arm64 wheels to pypi
Expand Down
2 changes: 1 addition & 1 deletion pyscfadlib/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ before-all = [
repair-wheel-command = "auditwheel -v repair -w {dest_dir} {wheel}"

[tool.cibuildwheel.macos]
archs = ["auto64"]
archs = ["universal2", "arm64"]
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"

0 comments on commit 557598e

Please sign in to comment.