mirror of
https://github.com/mrabarnett/mrab-regex.git
synced 2025-10-05 20:02:39 +02:00
Experiment with wheel building
Attempt refactoring
This commit is contained in:
42
.github/workflows/main.yml
vendored
42
.github/workflows/main.yml
vendored
@@ -55,10 +55,8 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VER }}
|
||||
|
||||
- name: Install cibuildwheel & build wheels
|
||||
run: |
|
||||
python -m pip install -U cibuildwheel
|
||||
python -m cibuildwheel --output-dir wheelhouse
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v3.1.2
|
||||
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -83,8 +81,8 @@ jobs:
|
||||
# (memcpy@GLIBC_2.14), so the wheels are not compatible with
|
||||
# manylinux1_x86_64 environment. In order to be compatible as
|
||||
# much as possible, this job builds manylinux1_x86_64 wheels.
|
||||
build_in_manylinux2010:
|
||||
name: Build in manylinux2010 environment
|
||||
build_in_manylinux2014:
|
||||
name: Build in manylinux2014 environment
|
||||
if: github.event_name == 'push'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -97,7 +95,7 @@ jobs:
|
||||
# manylinux_x_y >=20.3 3.8.10+, 3.9.5+, 3.10.0+ x.y
|
||||
# manylinux2010 images EOL on 2022-08-01, it doesn't support cp311.
|
||||
CIBW_BUILD: cp39-* cp310-*
|
||||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
|
||||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
|
||||
CIBW_ARCHS_LINUX: x86_64
|
||||
|
||||
steps:
|
||||
@@ -106,11 +104,8 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VER }}
|
||||
|
||||
- name: Build source distribution & wheels
|
||||
run: |
|
||||
python setup.py sdist --formats=gztar
|
||||
python -m pip install -U cibuildwheel
|
||||
python -m cibuildwheel --output-dir wheelhouse
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v3.1.2
|
||||
|
||||
- name: Upload source distribution
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -121,7 +116,7 @@ jobs:
|
||||
- name: Upload manylinux1_x86_64 wheels
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: regex-files-manylinux2010
|
||||
name: regex-files-manylinux2014
|
||||
path: wheelhouse/*.whl
|
||||
|
||||
# Build and upload aarch64/ppc64le/s390x wheels.
|
||||
@@ -134,11 +129,6 @@ jobs:
|
||||
matrix:
|
||||
arch: [aarch64, ppc64le, s390x]
|
||||
|
||||
env:
|
||||
CIBW_ARCHS: ${{ matrix.arch }}
|
||||
# Building in QEMU is very slow, so parallelize the tasks.
|
||||
CIBW_SKIP: "*musllinux* *manylinux*"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
@@ -146,12 +136,16 @@ jobs:
|
||||
python-version: ${{ env.PYTHON_VER }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Install cibuildwheel & build wheels
|
||||
run: |
|
||||
python -m pip install -U cibuildwheel
|
||||
python -m cibuildwheel --output-dir wheelhouse
|
||||
- name: Build wheels
|
||||
uses: pypa/cibuildwheel@v3.1.2
|
||||
with:
|
||||
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
|
||||
# Building in QEMU is very slow, so parallelize the tasks.
|
||||
CIBW_SKIP: "*musllinux* *manylinux*"
|
||||
|
||||
- name: Upload ${{ matrix.arch }} wheels
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -162,7 +156,7 @@ jobs:
|
||||
# Upload to PyPI
|
||||
upload_pypi:
|
||||
name: Publish to PyPI
|
||||
needs: [build_wheels, build_in_manylinux2010, build_arch_wheels]
|
||||
needs: [build_wheels, build_in_manylinux2014, build_arch_wheels]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@@ -10,7 +10,7 @@ readme = "README.rst"
|
||||
authors = [
|
||||
{name = "Matthew Barnett", email = "regex@mrabarnett.plus.com"},
|
||||
]
|
||||
license = "Apache-2.0"
|
||||
license = {file = "LICENSE.txt"}
|
||||
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
|
Reference in New Issue
Block a user