Commit b2780f23 authored by Stefan Behnel's avatar Stefan Behnel

Add more wheel targets and use the normal Makefile wheel build for everything.

parent aa0a4111
......@@ -35,89 +35,46 @@ jobs:
path: dist/*-none-any.whl
if-no-files-found: ignore
manylinux1-i686:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Build Linux wheels
uses: RalfG/python-wheels-manylinux-build@v0.4.0-manylinux1_i686
with:
python-versions: 'cp27-cp27m cp27-cp27mu cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels-Linux
path: dist/*-manylinux*.whl
if-no-files-found: ignore
binary:
strategy:
# Allows for matrix sub-jobs to fail without canceling the rest
fail-fast: false
matrix:
image:
- manylinux1_x86_64
- manylinux1_i686
- musllinux_1_1_x86_64
- manylinux_2_24_x86_64
- manylinux_2_24_i686
- manylinux_2_24_aarch64
manylinux1-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Build Linux wheels
uses: RalfG/python-wheels-manylinux-build@v0.4.0-manylinux1_x86_64
with:
python-versions: 'cp27-cp27m cp27-cp27mu cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels-Linux
path: wheels/*-manylinux*.whl
if-no-files-found: ignore
manylinux2014-i686:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- name: Build Linux wheels
uses: RalfG/python-wheels-manylinux-build@v0.4.0-manylinux2014_i686
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
- name: Building wheel
run: |
make sdist wheel_${{ matrix.image }}
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels-Linux
path: wheels/*manylinux2014*.whl
if-no-files-found: ignore
manylinux2014-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Copy wheels in dist
run: cp wheelhouse*/*.whl dist/
- name: Set up Python
uses: actions/setup-python@v1
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
python-version: 3.8
files: dist/*manylinux*.whl
- name: Build Linux wheels
uses: RalfG/python-wheels-manylinux-build@v0.4.0-manylinux2014_x86_64
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
- name: Upload wheels
- name: Archive Wheels
uses: actions/upload-artifact@v2
with:
name: wheels-Linux
path: wheels/*manylinux2014*.whl
name: ${{ matrix.image }}
path: dist/*manylinux*.whl
if-no-files-found: ignore
......@@ -4,8 +4,17 @@ TESTOPTS?=
REPO = git://github.com/cython/cython.git
VERSION?=$(shell sed -ne 's|^__version__\s*=\s*"\([^"]*\)".*|\1|p' Cython/Shadow.py)
MANYLINUX_IMAGE_X86_64=quay.io/pypa/manylinux1_x86_64
MANYLINUX_IMAGE_686=quay.io/pypa/manylinux1_i686
MANYLINUX_CFLAGS=-O3 -g0 -mtune=generic -pipe -fPIC
MANYLINUX_LDFLAGS=-flto
MANYLINUX_IMAGES= \
manylinux1_x86_64 \
manylinux1_i686 \
musllinux_1_1_x86_64 \
manylinux_2_24_x86_64 \
manylinux_2_24_i686 \
manylinux_2_24_aarch64 \
# manylinux_2_24_ppc64le \
# manylinux_2_24_s390x
all: local
......@@ -59,18 +68,22 @@ test: testclean
s5:
$(MAKE) -C Doc/s5 slides
wheel_manylinux: wheel_manylinux64 wheel_manylinux32
qemu-user-static:
docker run --rm --privileged hypriot/qemu-register
wheel_manylinux32 wheel_manylinux64: dist/$(PACKAGENAME)-$(VERSION).tar.gz
wheel_manylinux: sdist $(addprefix wheel_,$(MANYLINUX_IMAGES))
$(addprefix wheel_,$(filter-out %_x86_64, $(filter-out %_i686, $(MANYLINUX_IMAGES)))): qemu-user-static
wheel_%: dist/$(PACKAGENAME)-$(VERSION).tar.gz
echo "Building wheels for $(PACKAGENAME) $(VERSION)"
mkdir -p wheelhouse_$(subst wheel_,,$@)
time docker run --rm -t \
-v $(shell pwd):/io \
-e CFLAGS="-O3 -g0 -mtune=generic -pipe -fPIC" \
-e CFLAGS="$(MANYLINUX_CFLAGS) $(if $(patsubst %aarch64,,$@),-march=core2,-march=armv8-a -mtune=cortex-a72)" \
-e LDFLAGS="$(LDFLAGS) -fPIC" \
-e WHEELHOUSE=wheelhouse_$(subst wheel_,,$@) \
$(if $(patsubst %32,,$@),$(MANYLINUX_IMAGE_X86_64),$(MANYLINUX_IMAGE_686)) \
bash -c 'for PYBIN in /opt/python/*/bin; do \
-e WHEELHOUSE=wheelhouse$(subst wheel_musllinux,,$(subst wheel_manylinux,,$@)) \
quay.io/pypa/$(subst wheel_,,$@) \
bash -c 'for PYBIN in /opt/python/cp*/bin; do \
$$PYBIN/python -V; \
{ $$PYBIN/pip wheel -w /io/$$WHEELHOUSE /io/$< & } ; \
done; wait; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment