Skip to content

Commit 00b6579

Browse files
authored
Merge pull request #16 from virtualcell/add_python_310
Adding python 3.10 support
2 parents 34110f5 + 4d0fdda commit 00b6579

8 files changed

Lines changed: 1114 additions & 685 deletions

.github/workflows/docker.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
type: x86_64
1717
- os: ubuntu-24.04-arm
1818
type: aarch64
19+
glibc: [2_28, 2_34]
1920
runs-on: ${{ matrix.arch.os }}
2021
steps:
2122
- name: Check out
@@ -28,6 +29,15 @@ jobs:
2829
username: ${{ github.actor }}
2930
password: ${{ secrets.GITHUB_TOKEN }}
3031

32+
- name: Determine Maven Version
33+
run: |
34+
MAVEN_VERSION="$(curl -s https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/ | grep -o '3\.9\.[0-9]*' | sort -V | tail -1)"
35+
if [ -z "${MAVEN_VERSION}" ]; then
36+
echo "No valid maven version of 3.9.X found!"
37+
exit 1
38+
fi
39+
echo "MAVEN_VERSION=${MAVEN_VERSION}" >> $GITHUB_ENV
40+
3141
- name: Set up QEMU
3242
uses: docker/setup-qemu-action@v3
3343

@@ -38,8 +48,10 @@ jobs:
3848
uses: docker/build-push-action@v6
3949
with:
4050
context: docker
41-
file: docker/Dockerfile_manylinux_2_34_${{ matrix.arch.type }}
51+
file: docker/Dockerfile_manylinux_${{ matrix.glibc }}_${{ matrix.arch.type }}
4252
push: true
53+
build-args: |
54+
MAVEN_VERSION=${{ env.MAVEN_VERSION }}
4355
tags: |
44-
ghcr.io/virtualcell/manylinux_2_34_${{ matrix.arch.type }}:${{ github.event.inputs.tag }}
45-
ghcr.io/virtualcell/manylinux_2_34_${{ matrix.arch.type }}:latest
56+
ghcr.io/virtualcell/manylinux_${{ matrix.glibc }}_${{ matrix.arch.type }}:${{ github.event.inputs.tag }}
57+
ghcr.io/virtualcell/manylinux_${{ matrix.glibc }}_${{ matrix.arch.type }}:latest

.github/workflows/on-release-main.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
ubuntu-24.04-arm,
1919
macos-15,
2020
]
21+
glibc: [2_28, 2_34]
22+
2123
fail-fast: false
2224
runs-on: ${{ matrix.os }}
2325
defaults:
@@ -37,7 +39,7 @@ jobs:
3739
- name: Set up Python
3840
uses: actions/setup-python@v5
3941
with:
40-
python-version: "3.11"
42+
python-version: "3.10"
4143

4244
- uses: abatilo/actions-poetry@v3
4345

@@ -61,12 +63,27 @@ jobs:
6163
run: |
6264
ARCH=$(uname -m)
6365
echo "ARCH_DEF=$ARCH" >> $GITHUB_ENV
66+
echo "MANYLINUX_IMAGE_TARGET=ghcr.io/virtualcell/manylinux_${{ matrix.glibc }}_$ARCH:latest" >> $GITHUB_ENV
67+
CIBW_BUILD_STRING="cp310-*${{ env.ARCH_DEF }} cp311-*${{ env.ARCH_DEF }} cp312-*${{ env.ARCH_DEF }} cp313-*${{ env.ARCH_DEF }}"
68+
if [ "${{ matrix.glibc }}" = "2_34" ]; then
69+
CIBW_BUILD_STRING="$CIBW_BUILD_STRING cp314-*${{ env.ARCH_DEF }}"
70+
fi
71+
echo "CIBW_BUILD_TARGETS=$CIBW_BUILD_STRING" >> $GITHUB_ENV
72+
73+
- name: Run cibuildwheel (Ubuntu, x86_64)
74+
uses: pypa/cibuildwheel@v3.4.0
75+
if: ${{ startsWith(matrix.os, 'ubuntu') && env.ARCH_DEF == 'x86_64' }}
76+
env:
77+
CIBW_BUILD: "${{ env.CIBW_BUILD_TARGETS }}"
78+
CIBW_MANYLINUX_X86_64_IMAGE: "${{ env.MANYLINUX_IMAGE_TARGET }}"
79+
# CIBW_BUILD_VERBOSITY_LINUX: 2
6480

65-
- name: Run cibuildwheel
81+
- name: Run cibuildwheel (Ubuntu, aarch64)
6682
uses: pypa/cibuildwheel@v3.4.0
67-
if: ${{ startsWith(matrix.os, 'ubuntu') }}
83+
if: ${{ startsWith(matrix.os, 'ubuntu') && env.ARCH_DEF == 'aarch64' }}
6884
env:
69-
CIBW_BUILD: "cp311-*${{ env.ARCH_DEF }} cp312-*${{ env.ARCH_DEF }} cp313-*${{ env.ARCH_DEF }} cp314-*${{ env.ARCH_DEF }}"
85+
CIBW_BUILD: "${{ env.CIBW_BUILD_TARGETS }}"
86+
CIBW_MANYLINUX_AARCH64_IMAGE: "${{ env.MANYLINUX_IMAGE_TARGET }}"
7087
# CIBW_BUILD_VERBOSITY_LINUX: 2
7188

7289
- name: Run cibuildwheel
@@ -75,7 +92,7 @@ jobs:
7592
pip install cibuildwheel
7693
cibuildwheel --debug-traceback --output-dir wheelhouse
7794
env:
78-
CIBW_BUILD: "cp311-* cp312-* cp313-* cp314-*"
95+
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
7996
- name: Copy wheels to dist directory
8097
run: |
8198
mkdir -p dist

docker/Dockerfile_manylinux_2_28_aarch64

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM quay.io/pypa/manylinux_2_28_aarch64
33
ARG GRAALVM_VERSION=23.0.2
44
ARG GRAALVM_BUILD=7.1
55
ARG GRAALVM_ARCH=aarch64
6-
ARG MAVEN_VERSION=3.9.9
6+
# Due to how often maven yanks old patch-versions, we now require you provide the maven version at build time!
7+
ARG MAVEN_VERSION
78

89
# install graalvm community edition
910
RUN cd /opt && \

docker/Dockerfile_manylinux_2_28_x86_64

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM quay.io/pypa/manylinux_2_28_x86_64
33
ARG GRAALVM_VERSION=23.0.2
44
ARG GRAALVM_BUILD=7.1
55
ARG GRAALVM_ARCH=x64
6-
ARG MAVEN_VERSION=3.9.9
6+
# Due to how often maven yanks old patch-versions, we now require you provide the maven version at build time!
7+
ARG MAVEN_VERSION
78

89
# install graalvm community edition
910
RUN cd /opt && \

docker/Dockerfile_manylinux_2_34_aarch64

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM quay.io/pypa/manylinux_2_34_aarch64
33
ARG GRAALVM_VERSION=23.0.2
44
ARG GRAALVM_BUILD=7.1
55
ARG GRAALVM_ARCH=aarch64
6-
ARG MAVEN_VERSION=3.9.15
6+
# Due to how often maven yanks old patch-versions, we now require you provide the maven version at build time!
7+
ARG MAVEN_VERSION
78

89
# install graalvm community edition
910
RUN cd /opt && \

docker/Dockerfile_manylinux_2_34_x86_64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM quay.io/pypa/manylinux_2_34_x86_64
33
ARG GRAALVM_VERSION=23.0.2
44
ARG GRAALVM_BUILD=7.1
55
ARG GRAALVM_ARCH=x64
6-
ARG MAVEN_VERSION=3.9.15
6+
# Due to how often maven yanks old patch-versions, we now require you provide the maven version at build time!
7+
ARG MAVEN_VERSION
78

89
# install graalvm community edition
910
RUN cd /opt && \
@@ -20,7 +21,6 @@ RUN (curl -sSL https://install.python-poetry.org | python3 -) || ( echo "" && ec
2021
ENV PATH=~/.local/bin:$PATH
2122

2223
# Install Maven
23-
2424
RUN cd /opt && curl -L -o apache-maven.tar.gz https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz && ls && tar -xzvf apache-maven.tar.gz
2525
ENV MAVEN_HOME=/opt/apache-maven-${MAVEN_VERSION}
2626
ENV PATH=${MAVEN_HOME}/bin:$PATH

0 commit comments

Comments
 (0)