Skip to content

Bump pypa/cibuildwheel from 2.14.1 to 2.15.0 #423

Bump pypa/cibuildwheel from 2.14.1 to 2.15.0

Bump pypa/cibuildwheel from 2.14.1 to 2.15.0 #423

Workflow file for this run

name: Build
on:
push:
branches:
- master
paths:
- '.github/workflows/build.yml'
pull_request:
release:
types:
- published
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
jobs:
black:
name: black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup
run: pip install black
- name: Lint with black
run: black --check --diff .
flake8:
name: flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup
run: pip install flake8
- name: Lint with flake8
run: flake8
isort:
name: isort
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup
run: pip install isort[colors]
- name: Lint with isort
run: isort --check --diff .
mypy:
name: mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup
run: pip install mypy pytest
- name: Lint with mypy
run: mypy .
conda:
name: Conda ${{ matrix.python-version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.8', '3.9', '3.10', '3.11']
sidx-version: ['1.8.5','1.9.3']
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Setup
shell: bash -l {0}
run: |
conda install -c conda-forge numpy libspatialindex=${{ matrix.sidx-version }} -y
- name: Install
shell: bash -l {0}
run: |
pip install -e .
- name: Test with pytest
shell: bash -l {0}
run: |
pip install pytest
python -m pytest --doctest-modules rtree tests
ubuntu:
name: Ubuntu Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
- name: Setup
shell: bash -l {0}
run: |
sudo apt install libspatialindex-c6 python3-pip
python3 -m pip install --upgrade pip
python3 -m pip install setuptools numpy pytest
- name: Build
shell: bash -l {0}
run: |
python3 -m pip install --user .
- name: Test with pytest
shell: bash -l {0}
run: |
python3 -m pytest --doctest-modules rtree tests
wheels:
name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CIBW_SKIP: "pp* *-win32 cp312-*" # remove once numpy supports Python 3.12
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: ""
MACOSX_DEPLOYMENT_TARGET: 10.9
CIBW_BUILD_VERBOSITY_MACOS: 3
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64 *-musllinux* *i686"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: ""
CIBW_BEFORE_ALL_LINUX: "pip install cmake; bash {project}/ci/install_libspatialindex.bash"
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
- name: Run MacOS Preinstall Build
if: startsWith(matrix.os, 'macos')
run: |
# provides sha256sum
brew install coreutils
pip install cmake
bash ci/install_libspatialindex.bash
- uses: ilammy/msvc-dev-cmd@v1
if: startsWith(matrix.os, 'windows')
- name: Run Windows Preinstall Build
if: startsWith(matrix.os, 'windows')
run: |
choco install vcpython27 -f -y
ci\install_libspatialindex.bat
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-whl
path: wheelhouse/*.whl
wheels_aarch64:
name: Build Linux wheels on aarch64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
- uses: docker/setup-qemu-action@v2
name: Set up QEMU
with:
platforms: arm64
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: pp*
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_REQUIRES: pytest numpy
CIBW_TEST_COMMAND: "pytest -v {project}/tests"
CIBW_TEST_SKIP: "*-musllinux*"
CIBW_BEFORE_ALL_LINUX: "pip install cmake; bash {project}/ci/install_libspatialindex.bash"
- uses: actions/upload-artifact@v3
with:
name: aarch64-whl
path: wheelhouse/*.whl
collect-artifacts:
name: Package and push release
#needs: [windows-wheel, linux-wheel, osx-wheel, conda, ubuntu]
needs: [conda, ubuntu, wheels, wheels_aarch64]
runs-on: 'ubuntu-latest'
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
- name: Source
shell: bash -l {0}
run: |
sudo apt install libspatialindex-c6 python3-pip
python3 -m pip install --upgrade pip
python3 -m pip install setuptools numpy pytest wheel
export PATH=$PATH:/home/runner/.local/bin
python3 setup.py sdist
- uses: actions/download-artifact@v3
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@release/v1
name: Publish package
if: github.event_name == 'release' && github.event.action == 'published'
with:
user: __token__
password: ${{ secrets.pypi_token }}
packages_dir: ./dist