Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python 3.12 #50

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions .github/workflows/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ jobs:
strategy:
matrix:
include:
- distro: alpine
conda_ver: '23.5.2'
conda_suffix: '-0'
py_ver: '3.12'
platform: linux/amd64
py_label: py310_
conda_sha256: 634d76df5e489c44ade4085552b97bebc786d49245ed1a830022b0b406de5817
- distro: alpine
conda_ver: '23.5.2'
conda_suffix: '-0'
Expand Down Expand Up @@ -39,6 +46,13 @@ jobs:
platform: linux/amd64
py_label: py38_
conda_sha256: e2a4438671e0e42c5bba14cb51de6ce9763938184d6ca2967340bbe972bbe7e6
- distro: debian
conda_ver: '23.5.2'
conda_suffix: '-0'
py_ver: '3.12'
platform: linux/amd64
py_label: py310_
conda_sha256: 634d76df5e489c44ade4085552b97bebc786d49245ed1a830022b0b406de5817
- distro: debian
conda_ver: '23.5.2'
conda_suffix: '-0'
Expand Down Expand Up @@ -119,6 +133,12 @@ jobs:
strategy:
matrix:
include:
- distro: alpine
last_build_conda_ver: '22.11.1'
conda_ver: '23.5.2'
py_ver: '3.12'
platform: linux/amd64
package_manager: apk
- distro: alpine
last_build_conda_ver: '22.11.1'
conda_ver: '23.5.2'
Expand All @@ -143,6 +163,12 @@ jobs:
py_ver: '3.8'
platform: linux/amd64
package_manager: apk
- distro: debian
last_build_conda_ver: '22.11.1'
conda_ver: '23.5.2'
py_ver: '3.12'
platform: linux/amd64
package_manager: apt
- distro: debian
last_build_conda_ver: '22.11.1'
conda_ver: '23.5.2'
Expand Down Expand Up @@ -207,6 +233,10 @@ jobs:
strategy:
matrix:
include:
- distro: alpine
conda_ver: '23.5.2'
py_ver: '3.12'
platform: linux/amd64
- distro: alpine
conda_ver: '23.5.2'
py_ver: '3.11'
Expand All @@ -223,6 +253,10 @@ jobs:
conda_ver: '23.5.2'
py_ver: '3.8'
platform: linux/amd64
- distro: debian
conda_ver: '23.5.2'
py_ver: '3.12'
platform: linux/amd64
- distro: debian
conda_ver: '23.5.2'
py_ver: '3.11'
Expand Down Expand Up @@ -269,7 +303,7 @@ jobs:
docker push "${IMAGE}:${TAG}"
docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
docker push "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
[ "$PY_VER" == "3.11" ] && [ "$DISTRO" == "debian" ] \
[ "$PY_VER" == "3.12" ] && [ "$DISTRO" == "debian" ] \
&& docker tag "${IMAGE}:${TAG}" "${IMAGE}:latest" \
&& docker push "${IMAGE}:latest" \
|| echo "skipping 'latest' tag..."
Expand Down Expand Up @@ -314,4 +348,4 @@ jobs:
with:
branch: gh-pages
directory: gh-pages
github_token: ${{secrets.GITHUB_TOKEN}}
github_token: ${{secrets.GITHUB_TOKEN}}
5 changes: 1 addition & 4 deletions dist/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,10 @@ RUN \
# wget --quiet $(echo "https://repo.continuum.io/miniconda\
# /Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh" | \
# tr -d '\n' | tr -d '\t') && \
echo "${CONDA_SHA256} Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh" \
> miniconda.sha256 && \
if [ $(sha256sum -c miniconda.sha256 | awk '{print $2}') != "OK" ] ; then exit 1; fi && \
mv Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh miniconda.sh && \
mkdir -p /opt && \
sh ./miniconda.sh -b -p /opt/conda && \
rm miniconda.sh miniconda.sha256 && \
rm miniconda.sh && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
find /opt/conda/ -follow -type f -name '*.a' -delete && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
Expand Down
3 changes: 0 additions & 3 deletions dist/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ RUN \
wget --quiet $(echo "https://repo.anaconda.com/miniconda\
/Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh" | \
tr -d "\n" | tr -d "\t") && \
echo "${CONDA_SHA256} Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh" \
> miniconda.sha256 && \
if [ $(sha256sum -c miniconda.sha256 | awk '{print $2}') != "OK" ] ; then exit 1; fi && \
mv Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
Expand Down
5 changes: 5 additions & 0 deletions tests/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,13 @@ IMAGE=$(echo $REF | awk -F':' '{print $1}')
SHELL_CMD_TEMPLATE="docker run --rm -i \$SHELL_CMD_FLAGS $REF \
$(docker inspect "$REF" --format '{{join .Config.Cmd " "}}') -c"
# Get the compressed size of the last build from docker hub
[[ -z $LAST_BUILD_CONDA_VER ]] && echo "ERROR: LAST_BUILD_CONDA_VER not set" && exit 1
[[ -z $PY_VER ]] && echo "ERROR: PY_VER not set" && exit 1
[[ -z $DISTRO ]] && echo "ERROR: DISTRO not set" && exit 1
echo "Fetching LAST_BUILD_SIZE for image $IMAGE with LAST_BUILD_CONDA_VER=$LAST_BUILD_CONDA_VER, PY_VER=$PY_VER, DISTRO=$DISTRO"
LAST_BUILD_SIZE=$(curl -s https://hub.docker.com/v2/repositories/$IMAGE/tags \
| jq -r '.results[] | select(.name=="'"$LAST_BUILD_CONDA_VER"'-py'"$PY_VER"'-'"$DISTRO"'") | .images[0].size')
[[ -z $LAST_BUILD_SIZE ]] && echo "ERROR: could not fetch LAST_BUILD_SIZE" && exit 1
SIZE_INCRESE_FACTOR=1.5
SIZE_LIMIT=$(echo "scale=4; $LAST_BUILD_SIZE * $SIZE_INCRESE_FACTOR" | bc)
# Verify size minimal
Expand Down
Loading