|
24 | 24 | fail-fast: false |
25 | 25 | matrix: |
26 | 26 | os: [ubuntu-18.04] |
27 | | - cibw_python: [ "cp38-*", "cp39-*", "cp310-*", "cp311-*"] |
28 | | - cibw_manylinux: [ manylinux2014 ] |
29 | | - cibw_arch: [ "x86_64", "i686" ] |
| 27 | + cibw_python: ["cp38-*", "cp39-*", "cp310-*", "cp311-*"] |
| 28 | + cibw_manylinux: [manylinux2014] |
| 29 | + cibw_arch: ["x86_64"] |
30 | 30 | steps: |
31 | 31 | - uses: actions/checkout@v3 |
32 | 32 | with: |
|
46 | 46 | CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }} |
47 | 47 | CIBW_SKIP: "*-musllinux_*" |
48 | 48 | CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.cibw_manylinux }} |
49 | | - CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.cibw_manylinux }} |
50 | 49 | CIBW_ENVIRONMENT_PASS_LINUX: CESIUM_LINK_FLAGS |
51 | 50 | CESIUM_LINK_FLAGS: "-Wl,--strip-debug" |
52 | 51 | - uses: actions/upload-artifact@v3 |
@@ -74,21 +73,38 @@ jobs: |
74 | 73 | with: |
75 | 74 | python-version: '3.10' |
76 | 75 |
|
| 76 | + # See: |
| 77 | + # https://cibuildwheel.readthedocs.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64 |
| 78 | + # https://github.com/pypa/cibuildwheel/issues/1414 |
| 79 | + - name: Install experimental MacOSX Py38 |
| 80 | + if: startsWith(matrix.cibw_python, 'cp38') && (matrix.cibw_arch == 'arm64') |
| 81 | + run: | |
| 82 | + curl -o /tmp/Python38.pkg https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg |
| 83 | + sudo installer -pkg /tmp/Python38.pkg -target / |
| 84 | + sh "/Applications/Python 3.8/Install Certificates.command" |
| 85 | +
|
77 | 86 | - name: Install cibuildwheel |
78 | 87 | run: | |
79 | 88 | python -m pip install cibuildwheel |
80 | 89 |
|
81 | 90 | - name: Build wheels for CPython Mac OS |
82 | 91 | run: | |
83 | | - export MACOSX_DEPLOYMENT_TARGET=12.0 |
| 92 | + if [[ "$CIBW_ARCHS_MACOS" == arm64 ]]; then |
| 93 | + # SciPy requires 12.0 on arm to prevent kernel panics |
| 94 | + # https://github.com/scipy/scipy/issues/14688 |
| 95 | + # so being conservative, we just do the same here |
| 96 | + export MACOSX_DEPLOYMENT_TARGET=12.0 |
| 97 | + else |
| 98 | + export MACOSX_DEPLOYMENT_TARGET=10.9 |
| 99 | + fi |
| 100 | +
|
84 | 101 | echo MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} |
85 | 102 |
|
86 | 103 | python -m cibuildwheel --output-dir dist |
87 | 104 | env: |
88 | 105 | CIBW_BUILD: ${{ matrix.cibw_python }} |
89 | 106 | CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }} |
90 | 107 | CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 |
91 | | - CIBW_MANYLINUX_I686_IMAGE: manylinux1 |
92 | 108 | CIBW_TEST_SKIP: "*-macosx_arm64" |
93 | 109 |
|
94 | 110 | - uses: actions/upload-artifact@v3 |
|
0 commit comments