Skip to content

Build PyApprox Wheels #14

Build PyApprox Wheels

Build PyApprox Wheels #14

name: Build PyApprox Wheels
on:
push:
tags:
- '*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
manylinux:
name: ${{ matrix.TARGET }}/${{ matrix.wheel-version }}_wheel_creation
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
wheel-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310', 'cp311-cp311']
os: [ubuntu-latest]
include:
- os: ubuntu-latest
TARGET: manylinux
python-version: [3.8]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine wheel setuptools
- name: Build manylinux Python wheels
uses: RalfG/python-wheels-manylinux-build@a1e012c58ed3960f81b7ed2759a037fb0ad28e2d
with:
python-versions: ${{ matrix.wheel-version }}
build-requirements: 'cython'
package-path: ''
pip-wheel-args: ''
- name: Consolidate wheels
run: |
sudo test -d dist || mkdir -v dist
sudo find . -name pyapprox\*.whl | grep -v /dist/ | xargs -n1 -i mv -v "{}" dist/
- name: Delete linux wheels
run: |
sudo rm -rfv dist/*-linux_x86_64.whl
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: manylinux-wheels
path: dist
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@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine wheel setuptools numpy scipy cython
- name: Build generic tarball
run: |
python setup.py sdist --format=gztar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: generictarball
path: dist
osx:
name: ${{ matrix.TARGET }}py${{ matrix.python-version }}/wheel_creation
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
include:
- os: macos-latest
TARGET: osx
python-version: [ 3.7, 3.8, 3.9, '3.10', '3.11' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine wheel setuptools numpy scipy cython
- name: Build OSX Python wheels
run: |
python setup.py sdist --format=gztar bdist_wheel
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: osx-wheels
path: dist
windows:
name: ${{ matrix.TARGET }}py${{ matrix.python-version }}/wheel_creation
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
include:
- os: windows-latest
TARGET: win
python-version: [ 3.7, 3.8, 3.9, '3.10', '3.11' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: pwsh
run: |
$env:PYTHONWARNINGS="ignore::UserWarning"
Invoke-Expression "python -m pip install --upgrade pip"
Invoke-Expression "pip install setuptools twine wheel numpy scipy cython"
- name: Build Windows Python wheels
shell: pwsh
run: |
$env:PYTHONWARNINGS="ignore::UserWarning"
Invoke-Expression "python setup.py sdist --format=gztar bdist_wheel"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: win-wheels
path: dist