Skip to content

Add penalty weight parameter id to removed constraint for inverse loo… #81

Add penalty weight parameter id to removed constraint for inverse loo…

Add penalty weight parameter id to removed constraint for inverse loo… #81

name: Release Python SDK
on:
push:
tags:
- python-*
branches:
- main
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
command: build
args: --release --out dist --interpreter 3.9 3.10 3.11 3.12
working-directory: ./python/ommx
manylinux: manylinux_2_28
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: linux
path: ./python/ommx/dist
retention-days: 30
macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
command: build
args: --release --out dist --interpreter 3.9 3.10 3.11 3.12
working-directory: ./python/ommx
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: macos
path: ./python/ommx/dist
retention-days: 30
windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
command: build
args: --release --out dist --interpreter 3.9 3.10 3.11 3.12
working-directory: ./python/ommx
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: windows
path: ./python/ommx/dist
retention-days: 30
python-mip-adapter:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Build wheel
run: |
python -m pip install --upgrade pip build
python -m build --sdist --outdir ./dist ./python/ommx-python-mip-adapter
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: python-mip-adapter
path: ./dist/
retention-days: 30
pyscipopt-adapter:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Build wheel
run: |
python -m pip install --upgrade pip build
python -m build --sdist --outdir ./dist ./python/ommx-pyscipopt-adapter
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: pyscipopt-adapter
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,
check-wheel,
]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
pattern: "*"
merge-multiple: true
- name: Upload wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
next_version:
runs-on: ubuntu-latest
needs: publish
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Environment
uses: ./.github/actions/setup-test-environment
with:
python-version: "3.9"
- name: Bump version
run: |
echo "NEW_VERSION=$(uv run python/set-version.py)" >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: "Start developing OMMX Python SDK ${{ env.NEW_VERSION }}"
branch: "python-version-update/${{ env.NEW_VERSION }}"
base: "main"