From bcbe11dd9dc26ffb48a1d9f38e6d55c55932121f Mon Sep 17 00:00:00 2001 From: Chris Kuehl Date: Mon, 11 Oct 2021 13:22:01 -0700 Subject: [PATCH] Use a wildcard makefile target --- .github/workflows/ci.yaml | 7 +++++-- Makefile | 44 ++++----------------------------------- 2 files changed, 9 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d53a59a..395d2e5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/Makefile b/Makefile index 601a519..1ddbb37 100644 --- a/Makefile +++ b/Makefile @@ -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 \