Skip to content

Commit

Permalink
Validate wheel with twine 5.1.1, fix to maturin 1.7.5 (#182)
Browse files Browse the repository at this point in the history
- Use twine 5.1.1 for validating wheels until
pypa/gh-action-pypi-publish#309 is merged.
- twine 5.1.1 does not supports metadata 2.4, thus fix `maturin ==
1.7.5` since it uses metadata 2.4 until 1.7.6
PyO3/maturin#2335
  • Loading branch information
termoshtt authored Dec 4, 2024
1 parent 2b260df commit 504b606
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/actions/setup-test-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ runs:
run: |
pip install "ruff >= 0.7.0, < 0.8.0"
pip install pytest-github-actions-annotate-failures
pip install "twine == 5.1.1" # Please keep in sync with https://github.com/pypa/gh-action-pypi-publish/
- name: Install uv
uses: astral-sh/setup-uv@v3
33 changes: 32 additions & 1 deletion .github/workflows/release_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- python-*
branches:
- main
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -114,11 +116,40 @@ jobs:
path: ./dist/
retention-days: 30

check-wheel:
runs-on: ubuntu-latest
needs: [linux, macos, windows, python-mip-adapter, pyscipopt-adapter]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Test Environment
uses: ./.github/actions/setup-test-environment

- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
pattern: "*"
merge-multiple: true

- name: Check wheel
run: twine check --strict dist/*

publish:
if: startsWith(github.ref, 'refs/tags/python-')
runs-on: ubuntu-latest
permissions:
id-token: write
needs: [linux, macos, windows, python-mip-adapter, pyscipopt-adapter]
needs:
[
linux,
macos,
windows,
python-mip-adapter,
pyscipopt-adapter,
check-wheel,
]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions python/ommx/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[build-system]
requires = ["maturin>=1.5,<2.0"]
requires = ["maturin == 1.7.5"]
build-backend = "maturin"

[project]
name = "ommx"

version = "1.4.4"
description = "Open Mathematical prograMming eXchange (OMMX)"
authors = [{ name="Jij Inc.", email="info@j-ij.com" }]
authors = [{ name = "Jij Inc.", email = "info@j-ij.com" }]
readme = "README.md"

classifiers = [
Expand Down Expand Up @@ -61,4 +61,4 @@ module-name = "ommx._ommx_rust"
features = ["pyo3/extension-module"]

[tool.ruff.lint]
per-file-ignores = {"*_pb2.py" = ["ALL"]}
per-file-ignores = { "*_pb2.py" = ["ALL"] }

0 comments on commit 504b606

Please sign in to comment.