Skip to content

Pyomo Release Distribution Creation #52

Pyomo Release Distribution Creation

Pyomo Release Distribution Creation #52

name: Pyomo Release Distribution Creation
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
git-ref:
description: Git Hash (Optional)
required: false
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
PYOMO_SETUP_ARGS: "--with-cython --with-distributable-extensions"
jobs:
bdist_wheel:
name: Build wheels (${{ matrix.wheel-version }}) on ${{ matrix.os }} for ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest, macos-latest]
arch: [native]
wheel-version: ['cp38*', 'cp39*', 'cp310*', 'cp311*']
include:
# This doesn't work yet - have to explore why
# - os: ubuntu-22.04
# arch: aarch64
- os: macos-latest
arch: arm64
- os: windows-latest
arch: arm64
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: dist
env:
CIBW_PLATFORM: auto
CIBW_SKIP: "*-musllinux*"
CIBW_BUILD: ${{ matrix.wheel-version }}
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BEFORE_BUILD: pip install cython pybind11
CIBW_CONFIG_SETTINGS: '--global-option="--with-cython --with-distributable-extensions"'
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.whl
generictarball:
name: ${{ matrix.TARGET }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
TARGET: generic_tarball
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine wheel setuptools pybind11
- name: Build generic tarball
run: |
python setup.py --without-cython sdist --format=gztar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: generictarball
path: dist