@@ -112,12 +112,54 @@ jobs:
112
112
make latexpdf
113
113
working-directory : ./docs
114
114
115
+ wheels :
116
+ name : Build wheel on ${{ matrix.os }}
117
+ runs-on : ${{ matrix.os }}
118
+ env :
119
+ CIBW_SKIP : pp* *-win32
120
+ CIBW_TEST_REQUIRES : pytest numpy
121
+ CIBW_TEST_COMMAND : " pytest -v {project}/tests"
122
+ # we are copying the shared libraries ourselves so skip magical copy
123
+ CIBW_REPAIR_WHEEL_COMMAND_MACOS : " "
124
+ CIBW_REPAIR_WHEEL_COMMAND_WINDOWS : " "
125
+ CIBW_BEFORE_BUILD_LINUX : " pip install cmake; bash {project}/ci/install_libspatialindex.bash"
126
+ strategy :
127
+ matrix :
128
+ os : [windows-latest, ubuntu-latest, macos-latest]
129
+ steps :
130
+ - uses : actions/checkout@v1
131
+ - uses : actions/setup-python@v1
132
+ name : Install Python
133
+ with :
134
+ python-version : ' 3.7'
135
+ - name : Install cibuildwheel
136
+ run : |
137
+ python -m pip install cibuildwheel==1.6.4
138
+ - name : Run MacOS Preinstall Build
139
+ if : startsWith(matrix.os, 'macos')
140
+ run : |
141
+ # provides sha256sum
142
+ brew install coreutils
143
+ pip install cmake
144
+ bash ci/install_libspatialindex.bash
145
+ - name : Run Windows Preinstall Build
146
+ if : startsWith(matrix.os, 'windows')
147
+ run : |
148
+ choco install vcpython27 -f -y
149
+ ci\install_libspatialindex.bat
150
+ - name : Build wheels
151
+ run : |
152
+ python -m cibuildwheel --output-dir wheelhouse
153
+ - uses : actions/upload-artifact@v2
154
+ with :
155
+ name : ${{ matrix.os }}-whl
156
+ path : wheelhouse/*.whl
115
157
116
158
collect-artifacts :
117
159
name : Package and push release
118
160
119
161
# needs: [windows-wheel, linux-wheel, osx-wheel, conda, ubuntu]
120
- needs : [conda, ubuntu]
162
+ needs : [conda, ubuntu, wheels ]
121
163
122
164
runs-on : ' ubuntu-latest'
123
165
strategy :
@@ -134,6 +176,28 @@ jobs:
134
176
export PATH=$PATH:/home/runner/.local/bin
135
177
python3 setup.py sdist
136
178
179
+ - uses : actions/download-artifact@v2
180
+ with :
181
+ path : dist
182
+ name : Download artifacts
183
+
184
+ - name : Display structure of downloaded files
185
+ run : ls -R
186
+ working-directory : dist
187
+
188
+ - name : Unpack
189
+ shell : bash -l {0}
190
+ working-directory : dist
191
+ run : |
192
+ for f in *whl
193
+ do
194
+ cd "$f"
195
+ cp *.whl ..
196
+ cd ..
197
+ done;
198
+ rm -rf *\-whl
199
+ ls -al
200
+
137
201
- uses : pypa/gh-action-pypi-publish@master
138
202
name : Publish package
139
203
if : github.event_name == 'release' && github.event.action == 'published'
0 commit comments