58
58
echo github.ref ${{ github.ref }}
59
59
60
60
build_wheels :
61
- name : Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
61
+ name : Build wheel ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2 ] }}
62
62
needs : get_commit_message
63
63
if : >-
64
64
contains(needs.get_commit_message.outputs.message, '[wheel build]') ||
@@ -73,11 +73,15 @@ jobs:
73
73
# Github Actions doesn't support pairing matrix values together, let's improvise
74
74
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
75
75
buildplat :
76
- - [ubuntu-20.04, manylinux_x86_64]
77
- - [ubuntu-20.04, musllinux_x86_64]
78
- - [macos-12, macosx_x86_64]
79
- - [windows-2019, win_amd64]
80
- - [windows-2019, win32]
76
+ - [ubuntu-20.04, manylinux_x86_64, ""]
77
+ - [ubuntu-20.04, musllinux_x86_64, ""]
78
+ - [macos-13, macosx_x86_64, openblas]
79
+
80
+ # targeting macos >= 14. Could probably build on macos-14, but it would be a cross-compile
81
+ - [macos-13, macosx_x86_64, accelerate]
82
+ - [macos-14, macosx_arm64, accelerate] # always use accelerate
83
+ - [windows-2019, win_amd64, ""]
84
+ - [windows-2019, win32, ""]
81
85
python : ["cp39", "cp310", "cp311", "cp312", "pp39"]
82
86
exclude :
83
87
# Don't build PyPy 32-bit windows
@@ -123,6 +127,27 @@ jobs:
123
127
with :
124
128
python-version : " 3.x"
125
129
130
+ - name : Setup macOS
131
+ if : matrix.buildplat[0] == 'macos-13' || matrix.buildplat[0] == 'macos-14'
132
+ run : |
133
+ if [[ ${{ matrix.buildplat[2] }} == 'accelerate' ]]; then
134
+ # macosx_arm64 and macosx_x86_64 with accelerate
135
+ # only target Sonoma onwards
136
+ CIBW="MACOSX_DEPLOYMENT_TARGET=14.0 INSTALL_OPENBLAS=false RUNNER_OS=macOS"
137
+ echo "CIBW_ENVIRONMENT_MACOS=$CIBW" >> "$GITHUB_ENV"
138
+
139
+ # the macos-13 image that's used for building the x86_64 wheel can't test
140
+ # a wheel with deployment target >= 14 without further work
141
+ echo "CIBW_TEST_SKIP=*-macosx_x86_64" >> "$GITHUB_ENV"
142
+ else
143
+ # macosx_x86_64 with OpenBLAS
144
+ # if INSTALL_OPENBLAS isn't specified then scipy-openblas is automatically installed
145
+ CIBW="RUNNER_OS=macOS"
146
+ PKG_CONFIG_PATH="$PWD/.openblas"
147
+ DYLD="$DYLD_LIBRARY_PATH:/$PWD/.openblas/lib"
148
+ echo "CIBW_ENVIRONMENT_MACOS=$CIBW PKG_CONFIG_PATH=$PKG_CONFIG_PATH DYLD_LIBRARY_PATH=$DYLD" >> "$GITHUB_ENV"
149
+ fi
150
+
126
151
- name : Build wheels
127
152
uses : pypa/cibuildwheel@ce3fb7832089eb3e723a0a99cab7f3eaccf074fd # v2.16.5
128
153
env :
@@ -131,18 +156,21 @@ jobs:
131
156
132
157
- uses : actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
133
158
with :
134
- name : ${{ matrix.python }}-${{ startsWith( matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1 ] }}
159
+ name : ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2 ] }}
135
160
path : ./wheelhouse/*.whl
136
161
137
- - uses : conda-incubator /setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3
162
+ - uses : mamba-org /setup-micromamba@v1
138
163
with :
139
164
# for installation of anaconda-client, required for upload to
140
165
# anaconda.org
141
- # default (and activated) environment name is test
142
166
# Note that this step is *after* specific pythons have been used to
143
167
# build and test the wheel
144
- auto-update-conda : true
145
- python-version : " 3.10"
168
+ # for installation of anaconda-client, for upload to anaconda.org
169
+ # environment will be activated after creation, and in future bash steps
170
+ init-shell : bash
171
+ environment-name : upload-env
172
+ create-args : >-
173
+ anaconda-client
146
174
147
175
- name : Upload wheels
148
176
if : success()
@@ -153,7 +181,6 @@ jobs:
153
181
NUMPY_STAGING_UPLOAD_TOKEN : ${{ secrets.NUMPY_STAGING_UPLOAD_TOKEN }}
154
182
NUMPY_NIGHTLY_UPLOAD_TOKEN : ${{ secrets.NUMPY_NIGHTLY_UPLOAD_TOKEN }}
155
183
run : |
156
- conda install -y anaconda-client
157
184
source tools/wheels/upload_wheels.sh
158
185
set_upload_vars
159
186
# trigger an upload to
0 commit comments