Skip to content

Commit

Permalink
Build wheels for Apple arm64 architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinung-r committed Oct 6, 2023
1 parent de1db4e commit 7e61483
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
analyzers: "cppcheck"
scan: "scan-build --status-bugs"
mkdoc: "-DBUILD_DOC=ON -DSPHINX_ARGS=-WT"
- os: macos-13-xlarge
privledges: "sudo"
arch: arm64

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
arch: i686
- os: macOS-10.15
arch: x86_64
- os: macos-13-xlarge
arch: arm64

steps:
- uses: actions/checkout@v2
Expand All @@ -44,7 +46,7 @@ jobs:
CIBW_ENVIRONMENT_WINDOWS: >
CMAKE_GENERATOR="${{ matrix.cmake_generator }}"
CMAKE_GENERATOR_PLATFORM="${{ matrix.cmake_generator_platform }}"
CIBW_SKIP: pp* *-musllinux_*
CIBW_SKIP: pp* *-musllinux_* cp312-*
CIBW_ARCHS: ${{ matrix.arch }}
run: |
python -m cibuildwheel --output-dir wheelhouse python/
Expand Down
11 changes: 7 additions & 4 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires = [

[tool.cibuildwheel]
before-build = [
"""cmake \
"""${PRIVILEGES} cmake \
-S . \
-B build \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -18,7 +18,7 @@ before-build = [
-DBUILD_PYTHON=OFF \
-DBUILD_BIN=OFF \
""",
"""cmake \
"""${PRIVILEGES} cmake \
--build build \
--parallel \
--target install \
Expand Down Expand Up @@ -55,11 +55,14 @@ test-command = [
]

[tool.cibuildwheel.linux]
manylinux-x86_64-image = "manylinux2010"
before-all = "yum install blas-devel"
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"

[[tool.cibuildwheel.overrides]]
select = "cp311*"
manylinux-x86_64-image = "manylinux2014"

[tool.cibuildwheel.macos]
environment = { CXXFLAGS="-L/usr/local/lib" }
environment = { CXXFLAGS="-L/usr/local/lib", PRIVILEGES="sudo" }

0 comments on commit 7e61483

Please sign in to comment.