Skip to content

Commit 0058f02

Browse files
authored
fetch artifacts for dist upload (#174)
* fetch artifacts for dist upload * ymal syntax
1 parent 14fb3f0 commit 0058f02

File tree

3 files changed

+66
-58
lines changed

3 files changed

+66
-58
lines changed

.github/workflows/build.yml

+65-1
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,54 @@ jobs:
112112
make latexpdf
113113
working-directory: ./docs
114114

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
115157

116158
collect-artifacts:
117159
name: Package and push release
118160

119161
#needs: [windows-wheel, linux-wheel, osx-wheel, conda, ubuntu]
120-
needs: [conda, ubuntu]
162+
needs: [conda, ubuntu, wheels]
121163

122164
runs-on: 'ubuntu-latest'
123165
strategy:
@@ -134,6 +176,28 @@ jobs:
134176
export PATH=$PATH:/home/runner/.local/bin
135177
python3 setup.py sdist
136178
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+
137201
- uses: pypa/gh-action-pypi-publish@master
138202
name: Publish package
139203
if: github.event_name == 'release' && github.event.action == 'published'

.github/workflows/wheels.yml

-56
This file was deleted.

rtree/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
Rtree provides Python bindings to libspatialindex for quick
55
hyperrectangular intersection queries.
66
"""
7-
__version__ = '0.9.5'
7+
__version__ = '0.9.6'
88

99
from .index import Rtree, Index # noqa

0 commit comments

Comments
 (0)