@@ -39,30 +39,39 @@ jobs:
39
39
40
40
41
41
build_wheels :
42
- name : Wheels on ${{ matrix.platform_id }} - ${{ matrix.os }}
42
+ name : Wheels on ${{ matrix.os }} - ${{ matrix.cibw_archs }}
43
43
runs-on : ${{ matrix.os }}
44
44
strategy :
45
45
fail-fast : false
46
46
matrix :
47
- # Originally based on scikit-learn's config:
47
+ # Originally based on scikit-learn's config, but has diverged since :
48
48
# https://github.com/scikit-learn/scikit-learn/blob/main/.github/workflows/wheels.yml
49
49
include :
50
50
- os : windows-latest
51
- platform_id : win_amd64
51
+ cibw_archs : " AMD64 "
52
52
53
53
- os : ubuntu-latest
54
- platform_id : manylinux_x86_64
54
+ cibw_archs : " x86_64 "
55
55
- os : ubuntu-latest
56
- platform_id : manylinux_aarch64
56
+ cibw_archs : " aarch64"
57
+ # numpy wheels not available for aarch64 PyPy or musllinux
58
+ cibw_skip : " pp* *musl*"
57
59
58
60
- os : macos-latest
59
- platform_id : macosx_x86_64
61
+ cibw_archs : " x86_64 "
60
62
- os : macos-latest
61
- platform_id : macosx_arm64
63
+ cibw_archs : " arm64 "
62
64
63
65
steps :
64
66
- uses : actions/checkout@v4
65
67
68
+ - name : Setup QEMU
69
+ # for building non-x86 Linux wheels on x86 runner
70
+ if : runner.os == 'Linux'
71
+ uses : docker/setup-qemu-action@v2
72
+ with :
73
+ platforms : all
74
+
66
75
67
76
with :
68
77
package-dir : python
@@ -71,21 +80,24 @@ jobs:
71
80
72
81
CIBW_BUILD_VERBOSITY : 3
73
82
74
- # No 32-bit builds. See https://cibuildwheel.readthedocs.io/en/stable/options/#archs
75
- # Note: if trying 32-bit builds, add CIBW_BEFORE_TEST: "pip install --only-binary :all: numpy scipy"
76
- CIBW_SKIP : " *-win32 *_i686 "
83
+ CIBW_ARCHS : ${{ matrix.cibw_archs }}
84
+
85
+ CIBW_SKIP : ${{ matrix.cibw_skip }}
77
86
78
- # Allow pre-release numpy to test on newest Python
79
- CIBW_BEFORE_TEST : pip install --pre numpy
87
+ # Allow pre-release to test on newest Python that may only have beta or RC numpy packages available.
88
+ # --only-binary and ' || true' to best-effort numpy and scipy installation.
89
+ # Some platforms do not have binary wheels for either package, some only for numpy.
90
+ # Notably PyPy: no scipy wheels, and numpy wheels for only some versions.
91
+ CIBW_BEFORE_TEST : pip install --pre --only-binary ":all:" numpy && pip install --pre --only-binary ":all:" scipy || true
80
92
81
93
# make cibuildwheel install test dependencies from pyproject.toml
82
- CIBW_TEST_EXTRAS : " test "
94
+ CIBW_TEST_EXTRAS : " testmin "
83
95
84
96
# run tests in the {package}/tests dir which is python/tests
85
97
CIBW_TEST_COMMAND : " pytest {package}/tests"
86
98
87
- # Skip testing on PyPy and musllinux versions that SciPy does not ship wheels for .
88
- CIBW_TEST_SKIP : " pp* cp37*musllinux* cp38*musllinux* "
99
+ # Skip macOS ARM tests on Intel runner .
100
+ CIBW_TEST_SKIP : " *-macosx_arm64 "
89
101
90
102
- uses : actions/upload-artifact@v3
91
103
with :
@@ -111,10 +123,10 @@ jobs:
111
123
- uses : pypa/gh-action-pypi-publish@release/v1
112
124
with :
113
125
# PyPI does not allow replacing a file. Without this flag the entire action fails if even a single duplicate exists.
114
- skip_existing : true
126
+ skip-existing : true
115
127
verbose : true
116
128
# Real PyPI:
117
129
password : ${{ secrets.PYPI_API_TOKEN }}
118
130
# Test PyPI:
119
131
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
120
- # repository_url : https://test.pypi.org/legacy/
132
+ # repository-url : https://test.pypi.org/legacy/
0 commit comments