1.1.0 #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Python Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
build_sdist: | |
name: Build source packages | |
runs-on: ubuntu-latest | |
container: fedora:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo dnf -y install dnf-plugins-core | |
sudo dnf -y builddep createrepo_c.spec | |
sudo dnf -y install twine pytest | |
pip install --upgrade pip | |
pip install scikit-build | |
- name: Build Python sdist | |
run: python3 setup.py sdist | |
- name: Install and Test Python source package | |
run: | | |
pip install dist/*.tar.gz | |
pytest --verbose --color=yes tests/python/tests/ | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
build_bdist: | |
name: Build binary wheels | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- arch: auto64 # native 64-bit | |
skip: "pp* *-musllinux_* cp36* cp37* cp38*" # no PyPy or musl builds, no older Python versions | |
- arch: aarch64 | |
skip: "pp* *-musllinux_* cp36* cp37* cp38* cp310* cp312*" # qemu builds are incredibly slow, so only do 3.9 and 3.11 | |
# TODO: when github actions gets native aarch64 runners, we can ditch qemu and not worry about the emulation performance | |
steps: | |
- uses: actions/checkout@v4 | |
# setup Python for cibuildwheel | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Set up QEMU | |
if: runner.os == 'Linux' && ${{ matrix.arch }} == "aarch64" | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Build wheels for CPython | |
uses: pypa/[email protected] | |
env: | |
CIBW_ARCHS: ${{ matrix.arch }} | |
CIBW_SKIP: ${{ matrix.skip }} | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 # alma 8 | |
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 | |
CIBW_BEFORE_ALL_LINUX: dnf -y install epel-release && yes | dnf -y builddep createrepo_c.spec | |
CIBW_BEFORE_BUILD: python -m pip install scikit-build | |
CIBW_TEST_REQUIRES: pytest | |
CIBW_TEST_COMMAND: | | |
pytest --verbose --color=yes {project}/tests/python/tests/ | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
upload_pypi: | |
name: Publish packages to PyPI | |
# only publish packages once everything is successful | |
needs: [build_bdist, build_sdist] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{secrets.PYPI_API_TOKEN}} | |
# To test: repository_url: https://test.pypi.org/legacy/ |