瀏覽代碼

Merge topic 'ci-debian-legacy'

9d64df3e1c ci: Add job for Debian 10 legacy packages
07f42b3690 ci: Add an image for Python 2 on Debian 10

Acked-by: Kitware Robot <[email protected]>
Merge-request: !8676
Brad King 2 年之前
父節點
當前提交
f0c95e2630

+ 11 - 0
.gitlab-ci.yml

@@ -354,6 +354,17 @@ t:linux-gcc-cxx-modules-ninja-multi:
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
 
+t:debian10-legacy:
+    extends:
+        - .debian10_legacy
+        - .cmake_test_linux_release
+        - .linux_x86_64_tags
+        - .cmake_junit_artifacts
+        - .run_dependent
+        - .needs_centos6_x86_64
+    variables:
+        CMAKE_CI_JOB_NIGHTLY: "true"
+
 b:fedora38-ninja:
     extends:
         - .fedora38_ninja

+ 6 - 0
.gitlab/ci/configure_debian10_legacy.cmake

@@ -0,0 +1,6 @@
+set(CMake_TEST_FindPython2 "ON" CACHE BOOL "")
+set(CMake_TEST_FindPython2_IronPython "ON" CACHE BOOL "")
+set(CMake_TEST_FindPython2_NumPy "ON" CACHE BOOL "")
+set(CMake_TEST_FindPython2_PyPy "ON" CACHE BOOL "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")

+ 27 - 0
.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 <[email protected]>"
+
+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

+ 16 - 0
.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

+ 0 - 0
.gitlab/ci/docker/debian10-x86_64/docker-clean


+ 21 - 0
.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

+ 11 - 0
.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

+ 16 - 0
.gitlab/os-linux.yml

@@ -390,6 +390,22 @@
         CMAKE_CONFIGURATION: linux_gcc_cxx_modules_ninja_multi
         CMAKE_GENERATOR: "Ninja Multi-Config"
 
+### Debian 10 legacy packages
+
+.debian10:
+    image: "kitware/cmake:ci-debian10-x86_64-2023-07-31"
+
+    variables:
+        GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
+        CMAKE_ARCH: x86_64
+
+.debian10_legacy:
+    extends: .debian10
+
+    variables:
+        CMAKE_CONFIGURATION: debian10_legacy
+        CTEST_LABELS: "Python2"
+
 ## Tags
 
 .linux_x86_64_tags: