Skip to content

Commit 3b1f18e

Browse files
committed
Also build for the manylinux 2_34.
1 parent 6b58415 commit 3b1f18e

4 files changed

Lines changed: 16 additions & 22 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,13 @@ jobs:
8282
packages: write
8383
env:
8484
PY_VER: ${{ matrix.python-version }}
85-
BASE_IMAGE: quay.io/pypa/manylinux_2_28:latest
85+
BASE_IMAGE: quay.io/pypa/manylinux_${{ matrix.mnl-version }}:latest
8686
GHCR_REPO: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
8787
strategy:
8888
fail-fast: false
8989
matrix:
90-
python-version: ['3.8', '3.9', '3.11', '3.12']
90+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
91+
mnl-version: ['2_28', '2_34']
9192
steps:
9293
- name: Set up Python ${{ env.PY_VER }}
9394
uses: actions/setup-python@v5
@@ -118,7 +119,7 @@ jobs:
118119
sort -u | grep -v unknown | paste -sd ','`"
119120
GIT_BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
120121
GIT_BRANCH="${GIT_BRANCH#refs/tags/}"
121-
BUILD_IMAGE="${GHCR_REPO}:${GIT_BRANCH}-py${PY_VER}"
122+
BUILD_IMAGE="${GHCR_REPO}:${GIT_BRANCH}-py${PY_VER}-mnl${{ matrix.mnl-version }}"
122123
test "${{ github.event_name }}" != 'pull_request' && \
123124
CACHE_SPEC="type=registry,ref=${BUILD_IMAGE}-buildcache" || \
124125
CACHE_SPEC="gha"
@@ -150,7 +151,7 @@ jobs:
150151
- name: Upload built wheels
151152
uses: actions/upload-artifact@v4
152153
with:
153-
name: dist-${{ env.PY_VER }}
154+
name: dist-py${{ env.PY_VER }}-mnl${{ matrix.mnl-version }}
154155
path: dist
155156

156157
publish_pypi:
@@ -187,7 +188,7 @@ jobs:
187188
run: python setup.py build sdist
188189

189190
- name: Show context tree
190-
run: ls -R dist
191+
run: ls -lR dist
191192

192193
- name: Publish package distributions to PyPI
193194
if: github.event_name == 'release' && github.event.action == 'created'

docker/Dockerfile.python_wheels

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ WORKDIR /src
1010

1111
ARG TARGETPLATFORM
1212
ARG PY_VER
13-
RUN --mount=type=bind,source=scripts/build,target=scripts/build \
14-
sh -x scripts/build/install_depends_yum.sh
13+
14+
ARG PY_SVER="3${PY_VER#3.}"
15+
ARG PYTHON_CMD="/opt/python/cp${PY_SVER}-cp${PY_SVER}/bin/python"
16+
1517
RUN --mount=type=bind,source=scripts/build,target=scripts/build \
1618
sh -x scripts/build/install_depends_wheels.sh
1719

1820
COPY --exclude=.git --exclude=.github --exclude=docker --exclude=dist \
1921
--exclude=scripts . .
2022

21-
RUN python${PY_VER} -m build --wheel
23+
RUN ${PYTHON_CMD} -m build --wheel
2224
RUN auditwheel repair dist/*.whl --wheel-dir dist_out
2325

2426
FROM scratch AS export

scripts/build/install_depends_wheels.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -e
44

5-
python${PY_VER} -m ensurepip --upgrade
6-
python${PY_VER} -m pip install --upgrade pip
7-
python${PY_VER} -m pip install --upgrade build setuptools wheel auditwheel
5+
PYTHON_CMD="${PYTHON_CMD:-"python${PY_VER}"}"
6+
7+
${PYTHON_CMD} -m ensurepip --upgrade
8+
${PYTHON_CMD} -m pip install --upgrade pip
9+
${PYTHON_CMD} -m pip install --upgrade build setuptools wheel auditwheel

scripts/build/install_depends_yum.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)