Skip to content

TST: updating action scripts #7

TST: updating action scripts

TST: updating action scripts #7

Workflow file for this run

name: Upload Python Package
on:
push:
tags:
- '*.*.*'
jobs:
deploy:
strategy:
matrix:
runs-on: [macos-latest, windows-latest, ubuntu-latest]
python-version: [3.8, 3.9, '3.10', '3.11']
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setting up OpenMP for Linux
if: matrix.runs-on == 'ubuntu-latest'
run: |
sudo apt-get update; sudo apt-get install -y libomp5 libomp-dev
- name: Setting up OpenMP for MAC-OS
if: matrix.runs-on == 'macos-latest'
run: |
brew update
brew install libomp
- name: Install dependencies
if: matrix.runs-on == 'windows-latest' || (matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.10') || (matrix.runs-on == 'macos-latest')
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools wheel twine
python3 -m pip install -r ci_requirements.txt
- name: Build Windows or MAC-OS Python wheels
if: matrix.runs-on == 'windows-latest' || matrix.runs-on == 'macos-latest'
run: |
python3 setup.py sdist
python3 setup.py bdist_wheel
- name: Publish Windows or MAC-OS Python wheels
if: matrix.runs-on == 'windows-latest' || matrix.runs-on == 'macos-latest'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 -m twine upload dist/*.whl
- name: Publish source
if: matrix.runs-on == 'windows-latest' && matrix.python-version == '3.11'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 -m twine upload dist/*.tar.gz
- name: Build manylinux Python wheels
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: RalfG/python-wheels-manylinux-build@v0.7.1-manylinux2014_x86_64
with:
python-versions: 'cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
build-requirements: 'pip cython numpy scipy setuptools wheel twine'
- name: Publish manylinux Python wheels
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.11'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 -m pip install twine
python3 -m twine upload dist/*-manylinux*.whl