From 141596706cf7c81efefed6933d727b6966de8b22 Mon Sep 17 00:00:00 2001 From: Felipe Bordeu Date: Wed, 25 Feb 2026 10:12:27 +1030 Subject: [PATCH 1/5] Drop python 3.9 add support 3.13 --- .github/workflows/build.yml | 2 +- .github/workflows/pre-commit.yml | 2 +- .github/workflows/setup.yml | 2 +- .github/workflows/wheel.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9218f3e..c30897b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest ] - python: [ "3.9", "3.10", "3.11", "3.12" ] + python: [ "3.10", "3.11", "3.12", "3.13" ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 91950b4..31f38b5 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -18,5 +18,5 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" - uses: pre-commit/action@v2.0.3 diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 323a514..82b65ae 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -22,7 +22,7 @@ jobs: # 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" ] + python: [ "3.10", "3.11", "3.12", "3.13" ] runs-on: ${{ matrix.os }} steps: - name: Install MSBuild diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index e1ebc3d..0625e40 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: os: [ ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest ] - python: [ "3.9", "3.10", "3.11", "3.12" ] + python: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From 57fec3172efd28d28dca4e17fd61b3da175984ed Mon Sep 17 00:00:00 2001 From: Felipe Bordeu Date: Wed, 25 Feb 2026 10:13:11 +1030 Subject: [PATCH 2/5] Add action to upload sdist and wheels --- .github/workflows/pypi-wheels.yml | 130 ++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 .github/workflows/pypi-wheels.yml diff --git a/.github/workflows/pypi-wheels.yml b/.github/workflows/pypi-wheels.yml new file mode 100644 index 0000000..5c3f98f --- /dev/null +++ b/.github/workflows/pypi-wheels.yml @@ -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 From ff943ee9fa7d4bbe3fcd44d7d7a532e480ad68aa Mon Sep 17 00:00:00 2001 From: Felipe Bordeu Date: Wed, 25 Feb 2026 10:34:43 +1030 Subject: [PATCH 3/5] Update pre-commit to 3.0.1 --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 31f38b5..5b9bf5b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -19,4 +19,4 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.10" - - uses: pre-commit/action@v2.0.3 + - uses: pre-commit/action@v3.0.1 From 6308f035747367c1f5d5a10ddcc1355b4017d2a3 Mon Sep 17 00:00:00 2001 From: Felipe Bordeu Date: Wed, 25 Feb 2026 10:48:17 +1030 Subject: [PATCH 4/5] move bandit to 1.8.0 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d2783f..0101d6a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 From 247fda29926d6f7a93d73f6575f4fb6931269318 Mon Sep 17 00:00:00 2001 From: Felipe Bordeu Date: Wed, 25 Feb 2026 11:48:30 +1030 Subject: [PATCH 5/5] Reduce number of os to test (keep only latest) --- .github/workflows/build.yml | 2 +- .github/workflows/setup.yml | 2 +- .github/workflows/wheel.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c30897b..9ca9985 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest ] + os: [ ubuntu-latest, windows-latest, macos-latest ] python: [ "3.10", "3.11", "3.12", "3.13" ] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 82b65ae..786a644 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -21,7 +21,7 @@ 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 ] + os: [ ubuntu-latest, windows-latest ] python: [ "3.10", "3.11", "3.12", "3.13" ] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 0625e40..ecf5e8a 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest ] + os: [ ubuntu-latest, windows-latest, macos-latest ] python: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] runs-on: ${{ matrix.os }} steps: