Skip to content

Commit 90adef9

Browse files
committed
Use macos-13 runners for MacOS wheels since it is x86
- unable to get wheels to build on arm64
1 parent f255b8e commit 90adef9

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

.github/workflows/wheel.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,23 @@ name: Wheel Builder
33
on: [push, pull_request]
44

55
jobs:
6-
linux_wheels:
7-
name: Build wheels on ubuntu
8-
runs-on: ubuntu-latest
6+
build_wheels:
7+
name: Build wheels on ${{ matrix.os }} (${{ matrix.arch }})
8+
runs-on: ${{ matrix.runner }}
9+
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
include:
14+
# Linux (Ubuntu)
15+
- os: ubuntu-latest
16+
arch: x86_64
17+
runner: ubuntu-latest
18+
19+
# macOS
20+
#- os: macos-latest
21+
# arch: arm64
22+
# runner: macos-latest
923

1024
steps:
1125
- uses: actions/checkout@v4
@@ -15,8 +29,9 @@ jobs:
1529
# - name: Fetch all history for all tags
1630
# run: git fetch --prune --unshallow
1731

18-
- name: Build wheels
19-
uses: joerick/cibuildwheel@v1.9.0
32+
- name: Build wheels (Linux)
33+
if: matrix.os == 'ubuntu-latest' || matrix.arch == 'x86_64'
34+
uses: joerick/cibuildwheel@v2.22.0
2035
# to supply options, put them in 'env', like:
2136
env:
2237
# Only build for python 3.{7,8,9}
@@ -27,9 +42,13 @@ jobs:
2742
CIBW_BEFORE_ALL_LINUX: yum install -y lapack-devel openblas-devel fftw-devel
2843
# Use manylinux2014
2944
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
30-
CIBW_SKIP: cp27-*
3145
CIBW_DEPENDENCY_VERSIONS: latest
3246
CIBW_BEFORE_BUILD_LINUX: pip install --upgrade pip setuptools wheel numpy cmake ninja && git config --global --add safe.directory /project
47+
CIBW_SKIP: "*-musllinux_*"
48+
49+
#- name: Build wheels macOS (arm64)
50+
# if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
51+
# run: python -m cibuildwheel --output-dir wheelhouse
3352

3453
- uses: actions/upload-artifact@v4
3554
with:
@@ -44,7 +63,7 @@ jobs:
4463
strategy:
4564
matrix:
4665
python: [3.8, 3.9, "3.10", "3.11"]
47-
os: [macos-latest]
66+
os: [macos-13]
4867

4968
steps:
5069
- uses: actions/checkout@v4
@@ -117,8 +136,8 @@ jobs:
117136
overwrite: true
118137

119138
upload_pypi:
120-
needs: [linux_wheels, mac_wheels, build_sdist]
121-
# needs: [linux_wheels, build_sdist]
139+
needs: [build_wheels, mac_wheels, build_sdist]
140+
# needs: [build_wheels, build_sdist]
122141
runs-on: ubuntu-latest
123142
# upload to PyPI on every tag starting with 'v'
124143
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ endif()
8585

8686
include(CheckCXXCompilerFlag)
8787
IF(DEFINED ENV{CI})
88-
message(STATUS "CI environment detected. Set compilation flags accordingly (target ivybridge which supports avx).")
8988
if(APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
89+
message(STATUS "CI environment detected. Set compilation flags accordingly (target apple-m1).")
9090
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -mcpu=apple-m1 -ffp-contract=fast")
9191
else()
92+
message(STATUS "CI environment detected. Set compilation flags accordingly (target ivybridge which supports avx).")
9293
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -march=ivybridge -ffp-contract=fast")
9394
endif()
9495
elseif(DEFINED ENV{CONDA_BUILD})

extern/pybind11

Submodule pybind11 updated 207 files

0 commit comments

Comments
 (0)