Use a wildcard makefile target

This commit is contained in:
Chris Kuehl 2021-10-11 13:22:01 -07:00
parent 0216919db2
commit bcbe11dd9d
2 changed files with 9 additions and 42 deletions

View file

@ -8,20 +8,23 @@ jobs:
matrix:
include:
- arch: amd64
manylinux_arch: x86_64
docker_image: debian:buster
- arch: arm64
manylinux_arch: aarch64
docker_image: arm64v8/debian:buster
- arch: ppc64le
manylinux_arch: ppc64le
docker_image: ppc64le/debian:buster
- arch: s390x
manylinux_arch: s390x
docker_image: s390x/debian:buster
env:
BASE_IMAGE: ${{ matrix.docker_image }}
ARCH: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2
@ -48,7 +51,7 @@ jobs:
run: docker run --rm -v $(pwd):/mnt:rw ${{ matrix.docker_image }} /mnt/ci/docker-deb-test
- name: Build wheels
run: sudo make python-dists-$ARCH
run: sudo make python-dists-${{ matrix.manylinux_arch }}
- name: Upload build artifacts
uses: actions/upload-artifact@v2

View file

@ -30,51 +30,15 @@ release: python-dists
> sha256sums
.PHONY: python-dists
python-dists: python-dists-amd64 python-dists-arm64 python-dists-ppc64le python-dists-s390x
python-dists: python-dists-x86_64 python-dists-aarch64 python-dists-ppc64le python-dists-s390x
.PHONY: python-dists-amd64
python-dists-x86_64: VERSION.h
.PHONY: python-dists-%
python-dists-%: VERSION.h
python setup.py sdist
docker run \
--user $$(id -u):$$(id -g) \
-v `pwd`/dist:/dist:rw \
quay.io/pypa/manylinux1_x86_64:latest \
bash -exc ' \
/opt/python/cp35-cp35m/bin/pip wheel --wheel-dir /tmp /dist/*.tar.gz && \
auditwheel repair --wheel-dir /dist /tmp/*.whl --wheel-dir /dist \
'
.PHONY: python-dists-arm64
python-dists-aarch64: VERSION.h
python setup.py sdist
docker run \
--user $$(id -u):$$(id -g) \
-v `pwd`/dist:/dist:rw \
quay.io/pypa/manylinux2014_aarch64:latest \
bash -exc ' \
/opt/python/cp38-cp38/bin/pip wheel --wheel-dir /tmp /dist/*.tar.gz && \
auditwheel repair --wheel-dir /dist /tmp/*.whl --wheel-dir /dist \
'
.PHONY: python-dists-ppc64le
python-dists-ppc64le: VERSION.h
python setup.py sdist
docker run \
--user $$(id -u):$$(id -g) \
-v `pwd`/dist:/dist:rw \
quay.io/pypa/manylinux2014_ppc64le:latest \
bash -exc ' \
/opt/python/cp38-cp38/bin/pip wheel --wheel-dir /tmp /dist/*.tar.gz && \
auditwheel repair --wheel-dir /dist /tmp/*.whl --wheel-dir /dist \
'
.PHONY: python-dists-s390x
python-dists-s390x: VERSION.h
python setup.py sdist
docker run \
--user $$(id -u):$$(id -g) \
-v `pwd`/dist:/dist:rw \
quay.io/pypa/manylinux2014_s390x:latest \
quay.io/pypa/manylinux2014_$*:latest \
bash -exc ' \
/opt/python/cp38-cp38/bin/pip wheel --wheel-dir /tmp /dist/*.tar.gz && \
auditwheel repair --wheel-dir /dist /tmp/*.whl --wheel-dir /dist \