Skip to content

Commit

Permalink
[CI] Add macosx_arm64 python wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Sep 22, 2023
1 parent c86dbb1 commit 0332bc5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/uploadWheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ jobs:
cibw_build: cp310-macosx_x86_64
- os: macos-latest
cibw_build: cp311-macosx_x86_64
- os: macos-latest
cibw_build: cp38-macosx_arm64
- os: macos-latest
cibw_build: cp39-macosx_arm64
- os: macos-latest
cibw_build: cp310-macosx_arm64
- os: macos-latest
cibw_build: cp311-macosx_arm64

steps:
- name: Get CIRCT
Expand All @@ -57,6 +65,7 @@ jobs:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD_FRONTEND: build
SETUPTOOLS_SCM_DEBUG: True
CIBW_TEST_SKIP: "*-macosx_arm64"

- name: Upload (stage) wheels as artifacts
uses: actions/upload-artifact@v3
Expand Down
4 changes: 4 additions & 0 deletions lib/Bindings/Python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ def run(self):
"-DCIRCT_RELEASE_TAG_ENABLED=ON",
"-DCIRCT_RELEASE_TAG=firtool",
]
if 'macosx_arm64' in os.getenv('CIBW_BUILD', ''):
archs = re.findall(r"-arch (\S+)", os.getenv("ARCHFLAGS", ""))
if archs:
cmake_args.append(f"-DCMAKE_OSX_ARCHITECTURES={archs}")

# HACK: CMake fails to auto-detect static linked Python installations, which
# happens to be what exists on manylinux. We detect this and give it a dummy
Expand Down

0 comments on commit 0332bc5

Please sign in to comment.