Skip to content

releaseWithManyLinux #84

releaseWithManyLinux

releaseWithManyLinux #84

# Deploy to pypi for all plattforms
name: releaseWithManyLinux
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Build and deploy manylinux wheel
Linux-build:
runs-on: ubuntu-latest
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy cython
# This compilation is necessary to have the .c file for the next step
# Alternative is to include the .c file in the repo
- name: Compile cython code
run: |
python setup.py build_ext --inplace
- name: Install avaframe
run: |
pip install .
- name: build manylinux wheels
uses: RalfG/[email protected]
with:
python-versions: 'cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312'
build-requirements: 'cython numpy'
- name: Publish wheels to PyPI
run: |
pip install twine --break-system-packages
twine upload dist/*-manylinux*.whl
continue-on-error: true
# deploy source distribution
Source-dist:
runs-on: ubuntu-latest
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy cython
- name: Compile cython code
run: |
python setup.py build_ext --inplace
- name: Install avaframe
run: |
pip install .
- name: create source distribution
run: python setup.py sdist
- name: upload source distribution
run: |
pip install twine
twine upload dist/*
continue-on-error: true
# Build and deploy wheels for macos and windows using setup-python action.
Matrix-build:
runs-on: ${{ matrix.os }}
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
strategy:
matrix:
os: [windows-latest, macos-latest]
python-version: ['3.8','3.9','3.10','3.11','3.12']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: build wheel
run: |
pip install wheel setuptools
pip install numpy cython
- name: Compile cython code
run: |
python setup.py build_ext --inplace
- name: build wheel
run: |
python setup.py bdist_wheel
- name: upload wheel
run: |
pip install twine
twine upload dist/*
continue-on-error: true