[Fix] build for python 3.11-3.13 (#26) #50
Workflow file for this run
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
# This is a basic workflow to help you get started with Actions | |
name: Windows builds | |
on: [push, workflow_dispatch] | |
jobs: | |
windows_build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
msvc_arch: | |
- amd64 | |
python_ver: | |
- 3.11 | |
- 3.12 | |
- 3.13 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup MSVC toolset for Python 3.11 | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.msvc_arch }} | |
toolset: 14.2 | |
- name: Setup Python Architecture x64 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_ver }} | |
architecture: 'x64' | |
- name: Build and Test | |
shell: pwsh | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade virtualenv | |
python -m virtualenv venv | |
venv\\Scripts\\activate | |
pip install --upgrade setuptools wheel virtualenv twine | |
python setup.py build_ext --inplace | |
python -m unittest | |
- name: Build Wheels | |
shell: pwsh | |
run: | | |
venv\\Scripts\\activate | |
pip wheel -v -w wheelhouse --no-deps . | |
dir wheelhouse/* | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pygeoda-${{ matrix.python_ver }}-${{ matrix.msvc_arch }}-win | |
path: wheelhouse/ | |
- name: Publish to Pypi | |
if: startsWith(github.ref, 'refs/tags/v') | |
# not on windows: pypa/gh-action-pypi-publish@release/v1 | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
venv\\Scripts\\activate | |
python -m pip install --upgrade twine | |
python -m twine upload wheelhouse/*.whl |