Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest ]
python: [ "3.9", "3.10", "3.11", "3.12" ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
python: [ "3.10", "3.11", "3.12", "3.13" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: pre-commit/action@v2.0.3
python-version: "3.10"
- uses: pre-commit/action@v3.0.1
130 changes: 130 additions & 0 deletions .github/workflows/pypi-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: pypi wheel and upload

on:
workflow_dispatch:
inputs:
PyPiDeployTarget:
description: 'Environment to deploy to'
required: true
type: choice
options:
- 'No'
- 'test.pypi.org'
- 'pypi'
pull_request:
push:
tags:
# Matches tags like 1.0.0.1 or 12.34.56.78
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'


permissions:
contents: read


jobs:
build_wheels:
if: github.ref_name != ''
runs-on: ${{ matrix.os }}
strategy:
matrix:
os : ["ubuntu-latest", "windows-latest", "macos-latest"]

steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0

- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1 # Note: Ensure you use a valid version
with:
output-dir: wheelhouse
env:
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wheelhouse-${{ matrix.os }}
path: ./wheelhouse/*.whl

build_sdist:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python 3.13
uses: actions/setup-python@v4
with:
python-version: 3.13
- name: Install build dependencies
run: |
python -m pip install build
- name: Build eigency
run: |
python -m build --sdist .

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wheelhouse-sdist
path: ./dist/*.tar.gz

publish:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest

if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.PyPiDeployTarget != 'No')

steps:
- uses: actions/checkout@v4

- name: Download Linux wheels
uses: actions/download-artifact@v4
with:
name: wheelhouse-ubuntu-latest
path: artifacts

- name: Download macOS wheels
uses: actions/download-artifact@v4
with:
name: wheelhouse-macos-latest
path: artifacts

- name: Download Windows wheels
uses: actions/download-artifact@v4
with:
name: wheelhouse-windows-latest
path: artifacts

- name: Download SDist
uses: actions/download-artifact@v4
with:
name: wheelhouse-sdist
path: artifacts

- name: Install twine
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade twine

- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TEST_PYPI_TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
PYPI_TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
ls -la artifacts || true

if [ "${{ github.event.inputs.PyPiDeployTarget }}" == "pypi.org" ]; then
echo "Deploy to testpypi "
python -m twine upload artifacts/* -u "$TWINE_USERNAME" -p "$TEST_PYPI_TWINE_PASSWORD" --non-interactive --verbose
else
python -m twine upload --repository testpypi artifacts/* -u "$TWINE_USERNAME" -p "$PYPI_TWINE_PASSWORD" --non-interactive --verbose
fi
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
matrix:
# Disable MacOS testing because it's being dumb
# os: [ ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest ]
os: [ ubuntu-20.04, ubuntu-22.04, windows-latest ]
python: [ "3.9", "3.10", "3.11", "3.12" ]
os: [ ubuntu-latest, windows-latest ]
python: [ "3.10", "3.11", "3.12", "3.13" ]
runs-on: ${{ matrix.os }}
steps:
- name: Install MSBuild
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest ]
python: [ "3.9", "3.10", "3.11", "3.12" ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
python: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
rev: 1.8.0
hooks:
- id: bandit