Skip to content

Commit

Permalink
Merge pull request #43 from A-Baji/add-3.10
Browse files Browse the repository at this point in the history
python 3.10 image
  • Loading branch information
guzman-raphael authored Mar 30, 2022
2 parents f90cec3 + 0eff3ca commit e11f2d6
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 3 deletions.
45 changes: 43 additions & 2 deletions .github/workflows/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ jobs:
strategy:
matrix:
include:
- distro: alpine
conda_ver: 4.12.0
py_ver: '3.10'
platform: linux/amd64
py_label: py39_
conda_md5: 4e2f31e0b2598634c80daa12e4981647
- distro: alpine
conda_ver: 4.10.3
py_ver: 3.9
Expand All @@ -31,6 +37,11 @@ jobs:
py_ver: 3.6
platform: linux/amd64
conda_md5: a946ea1d0c4a642ddf0c3a26a18bb16d
- distro: debian
conda_ver: 4.12.0
py_ver: '3.10'
platform: linux/amd64
py_label: py39_
- distro: debian
conda_ver: 4.10.3
py_ver: 3.9
Expand Down Expand Up @@ -116,6 +127,11 @@ jobs:
strategy:
matrix:
include:
- distro: alpine
conda_ver: 4.12.0
py_ver: '3.10'
platform: linux/amd64
package_manager: apk
- distro: alpine
conda_ver: 4.10.3
py_ver: 3.9
Expand All @@ -136,6 +152,11 @@ jobs:
py_ver: 3.6
platform: linux/amd64
package_manager: apk
- distro: debian
conda_ver: 4.12.0
py_ver: '3.10'
platform: linux/amd64
package_manager: apt
- distro: debian
conda_ver: 4.10.3
py_ver: 3.9
Expand Down Expand Up @@ -198,12 +219,22 @@ jobs:
docker load < "${CONDA_VER}-py${PY_VER}-${DISTRO}-${PLATFORM_TAG}.tar.gz"
tests/main.sh
publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/master' &&
(
github.repository_owner == 'datajoint' ||
github.repository_owner == 'datajoint-company'
)
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- distro: alpine
conda_ver: 4.12.0
py_ver: '3.10'
platform: linux/amd64
- distro: alpine
conda_ver: 4.10.3
py_ver: 3.9
Expand All @@ -220,6 +251,10 @@ jobs:
conda_ver: 4.5.4
py_ver: 3.6
platform: linux/amd64
- distro: debian
conda_ver: 4.12.0
py_ver: '3.10'
platform: linux/amd64
- distro: debian
conda_ver: 4.10.3
py_ver: 3.9
Expand Down Expand Up @@ -283,7 +318,13 @@ jobs:
&& docker push "${IMAGE}:latest" \
|| echo "skipping 'latest' tag..."
publish-docs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/master' &&
(
github.repository_owner == 'datajoint' ||
github.repository_owner == 'datajoint-company'
)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 5 additions & 0 deletions config/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## build

# CONDA_VER=4.12.0
# PY_VER='3.10'
# PY_LABEL=py39_
# CONDA_MD5=4e2f31e0b2598634c80daa12e4981647

CONDA_VER=4.10.3
PY_VER=3.9
PY_LABEL=py39_
Expand Down
3 changes: 3 additions & 0 deletions dist/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ RUN \
apk add /tmp/glibc-i18n-2.25-r0.apk && \
rm /tmp/glibc-i18n-2.25-r0.apk && \
/usr/glibc-compat/bin/localedef -i en_US -c -f UTF-8 en_US.UTF-8 && \
# Remove after 4.12.0 version releases
[ "${CONDA_VER}" != "4.12.0" ] || CONDA_VER="4.11.0" && \
# Current latest Miniconda3 release
wget --quiet $(echo "https://repo.anaconda.com/miniconda\
/Miniconda3-${PY_LABEL}${CONDA_VER}-Linux-x86_64.sh" | \
Expand Down Expand Up @@ -111,6 +113,7 @@ RUN \
umask u+rwx,g+rwx,o-rwx && \
conda config --add channels conda-forge && \
conda config --set auto_update_conda False && \
[ "${PY_VER}" != "3.10" ] || conda install python=${PY_VER} conda=${CONDA_VER} && \
[ "${PY_VER}" != "3.6" ] || sed -i \
$(echo "s@version_relation_re = re.compile(r'(==|!=|<=|>=|<|>)(?!\[=<>!\])\
(\S\+)$')@version_relation_re = re.compile(r'(==|!=|<=|>=|<|>|=)\
Expand Down
3 changes: 3 additions & 0 deletions dist/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ RUN \
# bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 \
# libxrender1 git mercurial subversion && \
apt-get clean && \
# Remove after 4.12.0 version releases
[ "${CONDA_VER}" != "4.12.0" ] || CONDA_VER="4.11.0" && \
wget --quiet $(echo "https://repo.anaconda.com/miniconda\
/Miniconda3-${PY_LABEL}${CONDA_VER}-Linux-$(uname -m).sh" | \
tr -d "\n" | tr -d "\t") -O ~/miniconda.sh && \
Expand All @@ -56,6 +58,7 @@ RUN \
umask u+rwx,g+rwx,o-rwx && \
conda config --add channels conda-forge && \
conda config --set auto_update_conda False && \
[ "${PY_VER}" != "3.10" ] || conda install python=${PY_VER} conda=${CONDA_VER} && \
[ "${PY_VER}" != "3.6" ] || sed -i \
$(echo "s@version_relation_re = re.compile(r'(==|!=|<=|>=|<|>)(?!\[=<>!\])\
(\S\+)$')@version_relation_re = re.compile(r'(==|!=|<=|>=|<|>|=)\
Expand Down
6 changes: 5 additions & 1 deletion tests/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,18 @@ 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"
# Determine reference size
if [ $DISTRO == alpine ] && [ $PY_VER == '3.9' ] && [ $PLATFORM == 'linux/amd64' ]; then
if [ $DISTRO == alpine ] && [ $PY_VER == '3.10' ] && [ $PLATFORM == 'linux/amd64' ]; then
SIZE_LIMIT=478
elif [ $DISTRO == alpine ] && [ $PY_VER == '3.9' ] && [ $PLATFORM == 'linux/amd64' ]; then
SIZE_LIMIT=240
elif [ $DISTRO == alpine ] && [ $PY_VER == '3.8' ] && [ $PLATFORM == 'linux/amd64' ]; then
SIZE_LIMIT=188
elif [ $DISTRO == alpine ] && [ $PY_VER == '3.7' ] && [ $PLATFORM == 'linux/amd64' ]; then
SIZE_LIMIT=196
elif [ $DISTRO == alpine ] && [ $PY_VER == '3.6' ] && [ $PLATFORM == 'linux/amd64' ]; then
SIZE_LIMIT=155
elif [ $DISTRO == debian ] && [ $PY_VER == '3.10' ] && [ $PLATFORM == 'linux/amd64' ]; then
SIZE_LIMIT=572
elif [ $DISTRO == debian ] && [ $PY_VER == '3.9' ] && [ $PLATFORM == 'linux/amd64' ]; then
SIZE_LIMIT=311 #481
elif [ $DISTRO == debian ] && [ $PY_VER == '3.8' ] && [ $PLATFORM == 'linux/amd64' ]; then
Expand Down

0 comments on commit e11f2d6

Please sign in to comment.