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: ...@@ -35,89 +35,46 @@ jobs:
path: dist/*-none-any.whl path: dist/*-none-any.whl
if-no-files-found: ignore if-no-files-found: ignore
manylinux1-i686: binary:
runs-on: ubuntu-latest strategy:
steps: # Allows for matrix sub-jobs to fail without canceling the rest
- uses: actions/checkout@v2 fail-fast: false
- name: Set up Python matrix:
uses: actions/setup-python@v1 image:
with: - manylinux1_x86_64
python-version: 3.8 - manylinux1_i686
- musllinux_1_1_x86_64
- name: Build Linux wheels - manylinux_2_24_x86_64
uses: RalfG/python-wheels-manylinux-build@v0.4.0-manylinux1_i686 - manylinux_2_24_i686
with: - manylinux_2_24_aarch64
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
manylinux1-x86_64:
runs-on: ubuntu-latest 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: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python - name: Set up Python 3.9
uses: actions/setup-python@v1 uses: actions/setup-python@v2
with: with:
python-version: 3.8 python-version: 3.9
- name: Build Linux wheels - name: Building wheel
uses: RalfG/python-wheels-manylinux-build@v0.4.0-manylinux2014_i686 run: |
with: make sdist wheel_${{ matrix.image }}
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310'
- name: Upload wheels - name: Copy wheels in dist
uses: actions/upload-artifact@v2 run: cp wheelhouse*/*.whl dist/
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: Set up Python - name: Release
uses: actions/setup-python@v1 uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with: with:
python-version: 3.8 files: dist/*manylinux*.whl
- name: Build Linux wheels - name: Archive 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
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: wheels-Linux name: ${{ matrix.image }}
path: wheels/*manylinux2014*.whl path: dist/*manylinux*.whl
if-no-files-found: ignore if-no-files-found: ignore
...@@ -4,8 +4,17 @@ TESTOPTS?= ...@@ -4,8 +4,17 @@ TESTOPTS?=
REPO = git://github.com/cython/cython.git REPO = git://github.com/cython/cython.git
VERSION?=$(shell sed -ne 's|^__version__\s*=\s*"\([^"]*\)".*|\1|p' Cython/Shadow.py) VERSION?=$(shell sed -ne 's|^__version__\s*=\s*"\([^"]*\)".*|\1|p' Cython/Shadow.py)
MANYLINUX_IMAGE_X86_64=quay.io/pypa/manylinux1_x86_64 MANYLINUX_CFLAGS=-O3 -g0 -mtune=generic -pipe -fPIC
MANYLINUX_IMAGE_686=quay.io/pypa/manylinux1_i686 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 all: local
...@@ -59,18 +68,22 @@ test: testclean ...@@ -59,18 +68,22 @@ test: testclean
s5: s5:
$(MAKE) -C Doc/s5 slides $(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)" echo "Building wheels for $(PACKAGENAME) $(VERSION)"
mkdir -p wheelhouse_$(subst wheel_,,$@) mkdir -p wheelhouse_$(subst wheel_,,$@)
time docker run --rm -t \ time docker run --rm -t \
-v $(shell pwd):/io \ -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 LDFLAGS="$(LDFLAGS) -fPIC" \
-e WHEELHOUSE=wheelhouse_$(subst wheel_,,$@) \ -e WHEELHOUSE=wheelhouse$(subst wheel_musllinux,,$(subst wheel_manylinux,,$@)) \
$(if $(patsubst %32,,$@),$(MANYLINUX_IMAGE_X86_64),$(MANYLINUX_IMAGE_686)) \ quay.io/pypa/$(subst wheel_,,$@) \
bash -c 'for PYBIN in /opt/python/*/bin; do \ bash -c 'for PYBIN in /opt/python/cp*/bin; do \
$$PYBIN/python -V; \ $$PYBIN/python -V; \
{ $$PYBIN/pip wheel -w /io/$$WHEELHOUSE /io/$< & } ; \ { $$PYBIN/pip wheel -w /io/$$WHEELHOUSE /io/$< & } ; \
done; wait; \ 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