Skip to content

Commit

Permalink
fetch artifacts for dist upload (#174)
Browse files Browse the repository at this point in the history
* fetch artifacts for dist upload

* ymal syntax
  • Loading branch information
hobu committed Dec 22, 2020
1 parent 14fb3f0 commit 0058f02
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 58 deletions.
66 changes: 65 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,54 @@ jobs:
make latexpdf
working-directory: ./docs

wheels:
name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CIBW_SKIP: pp* *-win32
CIBW_TEST_REQUIRES: pytest numpy
CIBW_TEST_COMMAND: "pytest -v {project}/tests"
# we are copying the shared libraries ourselves so skip magical copy
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: ""
CIBW_BEFORE_BUILD_LINUX: "pip install cmake; bash {project}/ci/install_libspatialindex.bash"
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.6.4
- name: Run MacOS Preinstall Build
if: startsWith(matrix.os, 'macos')
run: |
# provides sha256sum
brew install coreutils
pip install cmake
bash ci/install_libspatialindex.bash
- name: Run Windows Preinstall Build
if: startsWith(matrix.os, 'windows')
run: |
choco install vcpython27 -f -y
ci\install_libspatialindex.bat
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-whl
path: wheelhouse/*.whl

collect-artifacts:
name: Package and push release

#needs: [windows-wheel, linux-wheel, osx-wheel, conda, ubuntu]
needs: [conda, ubuntu]
needs: [conda, ubuntu, wheels]

runs-on: 'ubuntu-latest'
strategy:
Expand All @@ -134,6 +176,28 @@ jobs:
export PATH=$PATH:/home/runner/.local/bin
python3 setup.py sdist
- uses: actions/download-artifact@v2
with:
path: dist
name: Download artifacts

- name: Display structure of downloaded files
run: ls -R
working-directory: dist

- name: Unpack
shell: bash -l {0}
working-directory: dist
run: |
for f in *whl
do
cd "$f"
cp *.whl ..
cd ..
done;
rm -rf *\-whl
ls -al
- uses: pypa/gh-action-pypi-publish@master
name: Publish package
if: github.event_name == 'release' && github.event.action == 'published'
Expand Down
56 changes: 0 additions & 56 deletions .github/workflows/wheels.yml

This file was deleted.

2 changes: 1 addition & 1 deletion rtree/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
Rtree provides Python bindings to libspatialindex for quick
hyperrectangular intersection queries.
"""
__version__ = '0.9.5'
__version__ = '0.9.6'

from .index import Rtree, Index # noqa

0 comments on commit 0058f02

Please sign in to comment.