102 lines
2.7 KiB
YAML
102 lines
2.7 KiB
YAML
|
|
name: CI Build Wheel
|
|
|
|
on:
|
|
push:
|
|
# branches: [master]
|
|
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
|
|
|
jobs:
|
|
|
|
build_setup:
|
|
name: Prepare environment for wheel builds
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Prepare wheel build
|
|
run: make -C python/ setup
|
|
- name: Store wheel configuration files
|
|
uses: actions/upload-artifact@v4.6.0
|
|
with:
|
|
name: wheel-config
|
|
path: python/
|
|
- name: Display files
|
|
run: ls -lR
|
|
|
|
build_wheels:
|
|
name: Build binary wheels on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
needs: [build_setup]
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
- name: Install cibuildwheel
|
|
run: python -m pip install cibuildwheel==2.1.2
|
|
- name: Get wheel configuration files
|
|
uses: actions/download-artifact@v4.1.7
|
|
with:
|
|
name: wheel-config
|
|
path: python/
|
|
- name: Build wheels
|
|
run: python -m cibuildwheel --output-dir wheelhouse
|
|
working-directory: python/
|
|
- name: Store binary wheels
|
|
uses: actions/upload-artifact@v4.6.0
|
|
with:
|
|
name: binary-wheels-${{matrix.os}}-${{ strategy.job-index }}
|
|
path: python/wheelhouse/*.whl
|
|
|
|
build_sdist:
|
|
name: Build source distribution
|
|
runs-on: ubuntu-24.04
|
|
needs: [build_setup]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install cython
|
|
run: python -m pip install cython==0.29.24
|
|
- name: Get wheel configuration files
|
|
uses: actions/download-artifact@v4.1.7
|
|
with:
|
|
name: wheel-config
|
|
path: python/
|
|
- name: Build sdist
|
|
run: python setup.py sdist
|
|
working-directory: python/
|
|
- name: Store source wheels
|
|
uses: actions/upload-artifact@v4.6.0
|
|
with:
|
|
name: source-wheels
|
|
path: python/dist/*.tar.gz
|
|
- name: Display files
|
|
run: ls -lR
|
|
|
|
|
|
upload_pypi:
|
|
name: Upload wheels to PyPI
|
|
runs-on: ubuntu-24.04
|
|
needs: [build_wheels, build_sdist]
|
|
|
|
steps:
|
|
- name: Get source wheels
|
|
uses: actions/download-artifact@v4.1.7
|
|
with:
|
|
name: source-wheels
|
|
path: dist/
|
|
- name: Get binary wheels
|
|
uses: actions/download-artifact@v4.1.7
|
|
with:
|
|
path: dist/
|
|
pattern: binary-wheels-*
|
|
merge-multiple: true
|
|
- name: Display files
|
|
run: ls -lR
|
|
|
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.IMCTERMITE_GITHUB_WORKFLOW_PYPI_API_TOKEN }}
|