Skip to content

update version to be able to upload to pypi #371

update version to be able to upload to pypi

update version to be able to upload to pypi #371

name: Build and upload to PyPI
on: [push]
jobs:
build_linux_wheels_manylinux_2_28:
name: Build wheels for manylinux_2_28
runs-on: ubuntu-latest
env:
CIBW_SKIP: pp* cp27-* cp35-* cp36-* *-i686 *musllinux*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_ARCHS: x86_64
CIBW_BEFORE_ALL_LINUX: dnf makecache && dnf install --assumeyes sqlite-devel
CIBW_BEFORE_BUILD: pip install setuptools scikit-build wheel cmake
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-manylinux_2_28
build_linux_wheels_manylinux2014:
name: Build wheels for manylinux2014
runs-on: ubuntu-latest
env:
CIBW_SKIP: pp* cp27-* cp35-* cp36-* *-i686 *musllinux*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BEFORE_ALL_LINUX: yum install -y sqlite-devel
CIBW_BEFORE_BUILD: pip install setuptools scikit-build wheel cmake
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-manylinux2014
build_linux_wheels_musllinux_x86_64:
name: Build wheels for musllinux_x86_64 (alpine)
runs-on: ubuntu-latest
env:
CIBW_BUILD: "*musllinux*"
CIBW_BEFORE_ALL_LINUX: apk add sqlite-dev
CIBW_BEFORE_BUILD: pip install setuptools scikit-build wheel cmake
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-musllinux_x86_64
build_windows_wheels:
name: Build wheels on windows-latest
runs-on: windows-2019
env:
CMAKE_GENERATOR: "Visual Studio 16 2019"
SQLite3_ROOT: "C:/vcpkg/installed/x64-windows"
CIBW_SKIP: cp27-* cp35-* cp36-* *-win32
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Install Deps
run: |
C:/vcpkg/vcpkg install sqlite3[rtree,fts3,json1] --triplet x64-windows
C:/vcpkg/vcpkg integrate install
pip install setuptools scikit-build wheel cmake delvewheel
dir "C:/vcpkg/installed/x64-windows/bin"
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-windows
build_windows_32_wheels:
name: Build 32bit wheels on windows-latest
runs-on: windows-2019
env:
CMAKE_GENERATOR: "Visual Studio 16 2019"
CMAKE_GENERATOR_PLATFORM: "Win32"
SQLite3_ROOT: "C:/vcpkg/installed/x86-windows"
CIBW_SKIP: cp27-* cp35-* cp36-* pp* *-win_amd64
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path C:/vcpkg/installed/x86-windows/bin --no-mangle-all -v -w {dest_dir} {wheel}"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
architecture: x86
- name: Install Deps
run: |
C:/vcpkg/vcpkg install sqlite3[rtree,fts3,json1] --triplet x86-windows
C:/vcpkg/vcpkg integrate install
pip install setuptools scikit-build wheel cmake delvewheel
dir "C:/vcpkg/installed/x86-windows/bin"
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-windows_32
build_macos_arm64_wheels:
name: Build wheels on macos-14 (arm64)
runs-on: macos-14
env:
SQLite3_ROOT: ${{ github.workspace }}/libs
MACOSX_DEPLOYMENT_TARGET: '14.0'
CIBW_SKIP: cp27-* cp35-* cp36-*
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
CIBW_BEFORE_ALL: >
wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz &&
tar -xzvf sqlite-autoconf-3460100.tar.gz &&
cd sqlite-autoconf-3460100 &&
CC=clang CFLAGS="-arch arm64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ &&
make install
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Install Deps
run: |
pip install setuptools scikit-build wheel cmake
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-macos_arm64
build_macos_wheels:
name: Build wheels on macos-13
runs-on: macos-13
env:
SQLite3_ROOT: ${{ github.workspace }}/libs
MACOSX_DEPLOYMENT_TARGET: '10.9'
CIBW_SKIP: cp27-* cp35-* cp36-*
CIBW_TEST_COMMAND: python -c "import pygeodiff; pygeodiff.GeoDiff().version()"
CIBW_BEFORE_ALL: >
wget https://www.sqlite.org/2024/sqlite-autoconf-3460100.tar.gz &&
tar -xzvf sqlite-autoconf-3460100.tar.gz &&
cd sqlite-autoconf-3460100 &&
CC=clang CFLAGS="-arch x86_64 -O3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA" ./configure --enable-dynamic-extensions --prefix=${{ github.workspace }}/libs/ &&
make install
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Install Deps
run: |
pip install setuptools scikit-build wheel cmake
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: dist-macos
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.9'
- name: Install deps
run: |
pip install --upgrade pip
pip install setuptools twine scikit-build wheel cmake
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
name: dist-source
upload_pypi:
needs: [build_windows_wheels, build_linux_wheels_manylinux_2_28, build_linux_wheels_manylinux2014, build_linux_wheels_musllinux_x86_64, build_macos_wheels, build_macos_arm64_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# To test: repository_url: https://test.pypi.org/legacy/