This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
Update README about MobilityDB 1.1 release #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build and publish wheels to PyPI | |
# Build runs on every push | |
# Publish runs only on a tag push | |
# Note: This does not publish sdist | |
name: Wheels | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build wheel on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: 3.10.5 | |
- name: Setup GEOS for Mac OS | |
if: matrix.os == 'macos-latest' | |
run: brew install geos | |
- name: Setup GEOS for Windows | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: bash scripts/prepare_for_build.sh | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.6.1 | |
- name: Build wheels | |
env: | |
# Skipping: | |
# - pypy - MEOS doesn't support it as of now | |
# - Python 2.7 - MEOS doesn't support it | |
# - Linux (32-bit) | |
# - Windows (32-bit) | |
# Refer: https://cibuildwheel.readthedocs.io/en/stable/cpp_standards/#windows-and-python-27 | |
CIBW_SKIP: pp* cp27* *win32 *i686 | |
CIBW_BEFORE_BUILD_LINUX: bash scripts/prepare_for_build.sh | |
CIBW_ENVIRONMENT_WINDOWS: 'PATH="C:/Program Files (x86)/GEOS/bin;{project};$PATH" GEOS_LIBRARY_PATH="C:/Program Files (x86)/GEOS/lib" GEOS_INCLUDE_PATH="C:/Program Files (x86)/GEOS/include"' | |
CIBW_BEFORE_TEST: pip install -r test/python/requirements.txt | |
CIBW_TEST_COMMAND: pytest {project}/test/python | |
run: | | |
python -m cibuildwheel --output-dir dist | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: ./dist | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: dist | |
path: dist/ | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} |