diff options
author | Brad King <brad.king@kitware.com> | 2023-07-31 16:02:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-07-31 17:47:41 (GMT) |
commit | 07f42b36901541f8e979f10f9b5a405b5baeacb2 (patch) | |
tree | 6153b43abffaff8a5c8882c9d8e38befb8b31fab /.gitlab | |
parent | eb9195e9ef6fd299b25d44b966129c587ec46e2d (diff) | |
download | CMake-07f42b36901541f8e979f10f9b5a405b5baeacb2.zip CMake-07f42b36901541f8e979f10f9b5a405b5baeacb2.tar.gz CMake-07f42b36901541f8e979f10f9b5a405b5baeacb2.tar.bz2 |
ci: Add an image for Python 2 on Debian 10
Debian 12 no longer packages Python 2, so we test Python 2 find
modules on an older version.
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/docker/debian10-x86_64/Dockerfile | 27 | ||||
-rw-r--r-- | .gitlab/ci/docker/debian10-x86_64/deps_packages.lst | 16 | ||||
-rw-r--r-- | .gitlab/ci/docker/debian10-x86_64/docker-clean | 0 | ||||
-rw-r--r-- | .gitlab/ci/docker/debian10-x86_64/dpkg-exclude | 21 | ||||
-rwxr-xr-x | .gitlab/ci/docker/debian10-x86_64/install_deps.sh | 11 |
5 files changed, 75 insertions, 0 deletions
diff --git a/.gitlab/ci/docker/debian10-x86_64/Dockerfile b/.gitlab/ci/docker/debian10-x86_64/Dockerfile new file mode 100644 index 0000000..c39b380 --- /dev/null +++ b/.gitlab/ci/docker/debian10-x86_64/Dockerfile @@ -0,0 +1,27 @@ +# syntax=docker/dockerfile:1 + +ARG BASE_IMAGE=debian:10 + +FROM ${BASE_IMAGE} AS apt-cache +# Populate APT cache w/ the fresh metadata and prefetch packages. +# Use an empty `docker-clean` file to "hide" the image-provided +# file to disallow removing packages after `apt-get` operations. +RUN --mount=type=tmpfs,target=/var/log \ + --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \ + --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ + apt-get update \ + && apt-get --download-only -y install $(grep -h '^[^#]\+$' /root/*.lst) + + +FROM ${BASE_IMAGE} +LABEL maintainer="Brad King <brad.king@kitware.com>" + +RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \ + --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ + --mount=type=bind,source=dpkg-exclude,target=/etc/dpkg/dpkg.cfg.d/exclude \ + --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \ + --mount=type=cache,from=apt-cache,source=/var/lib/apt/lists,target=/var/lib/apt/lists \ + --mount=type=cache,from=apt-cache,source=/var/cache/apt,target=/var/cache/apt,sharing=private \ + --mount=type=tmpfs,target=/var/log \ + --mount=type=tmpfs,target=/tmp \ + sh /root/install_deps.sh diff --git a/.gitlab/ci/docker/debian10-x86_64/deps_packages.lst b/.gitlab/ci/docker/debian10-x86_64/deps_packages.lst new file mode 100644 index 0000000..b415421 --- /dev/null +++ b/.gitlab/ci/docker/debian10-x86_64/deps_packages.lst @@ -0,0 +1,16 @@ +# Install build requirements. +libssl-dev + +# Install development tools. +g++ +curl +git + +# Tools needed for the test suite. +jq + +# Packages needed to test find modules. +python2 python2-dev python-numpy pypy pypy-dev + +# CMake_TEST_FindPython2_IronPython +libmono-system-windows-forms4.0-cil diff --git a/.gitlab/ci/docker/debian10-x86_64/docker-clean b/.gitlab/ci/docker/debian10-x86_64/docker-clean new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.gitlab/ci/docker/debian10-x86_64/docker-clean diff --git a/.gitlab/ci/docker/debian10-x86_64/dpkg-exclude b/.gitlab/ci/docker/debian10-x86_64/dpkg-exclude new file mode 100644 index 0000000..60b6565 --- /dev/null +++ b/.gitlab/ci/docker/debian10-x86_64/dpkg-exclude @@ -0,0 +1,21 @@ +# Drop all man pages +path-exclude=/usr/share/man/* + +# Drop all info pages +path-exclude=/usr/share/info/* + +# Drop all README files except from the some packages +path-exclude=/usr/**/*README* +path-include=/usr/share/devscripts/templates/README.mk-build-deps +path-include=/usr/share/equivs/template/debian/README.Debian.in + +# Drop all translations +path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo + +# Drop all documentation ... +path-exclude=/usr/share/doc/* +path-exclude=/usr/share/doc-base/* +path-exclude=/usr/share/gtk-doc/* + +# Per package excludes +path-exclude=/usr/share/gnupg/help.*.txt diff --git a/.gitlab/ci/docker/debian10-x86_64/install_deps.sh b/.gitlab/ci/docker/debian10-x86_64/install_deps.sh new file mode 100755 index 0000000..002f136 --- /dev/null +++ b/.gitlab/ci/docker/debian10-x86_64/install_deps.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +apt-get install -y $(grep '^[^#]\+$' /root/deps_packages.lst) + +curl -L -O https://github.com/IronLanguages/ironpython2/releases/download/ipy-2.7.12/ironpython_2.7.12.deb +echo 'b7b90c82cf311dd3faf290ce3f274af5128b96db884a88dd643ce141bbf12fb9 ironpython_2.7.12.deb' > ironpython.sha256sum +sha256sum --check ironpython.sha256sum +dpkg -i ironpython_2.7.12.deb +rm ironpython_2.7.12.deb ironpython.sha256sum |