From 7cd8f1cc6e17af54fb78768c259a615b1ccc0205 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 13 Sep 2024 07:52:51 +0200 Subject: ci: add Ubuntu 16.04 job to GitLab CI In the preceding commits we had to convert the linux32 job to be based on Ubuntu 20.04 instead of Ubuntu 16.04 due to a limitation in GitHub Workflows. This was the only job left that still tested against this old but supported Ubuntu version, and we have no other jobs that test with a comparatively old Linux distribution. Add a new job to GitLab CI that tests with Ubuntu 16.04 to cover the resulting test gap. GitLab doesn't modify Docker images in the same way GitHub does and thus doesn't fall prey to the same issue. There are two compatibility issues uncovered by this: - Ubuntu 16.04 does not support HTTP/2 in Apache. We thus cannot set `GIT_TEST_HTTPD=true`, which would otherwise cause us to fail when Apache fails to start. - Ubuntu 16.04 cannot use recent JGit versions as they depend on a more recent Java runtime than we have available. We thus disable installing any kind of optional dependencies that do not come from the package manager. These two restrictions are fine though, as we only really care about whether Git compiles and runs on such old distributions in the first place. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- ci/install-dependencies.sh | 5 +++++ ci/lib.sh | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index d04f2a490b..e2c6ef0f66 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -55,6 +55,11 @@ ubuntu-*|ubuntu32-*) ${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE case "$distro" in + ubuntu-16.04) + # Does not support JGit, but we also don't really care about + # the others. We rather care whether Git still compiles and + # runs fine overall. + ;; ubuntu-*) mkdir --parents "$CUSTOM_PATH" diff --git a/ci/lib.sh b/ci/lib.sh index 51f8f59a29..74b430be23 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -336,7 +336,14 @@ ubuntu-*) fi MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE" - export GIT_TEST_HTTPD=true + case "$distro" in + ubuntu-16.04) + # Apache is too old for HTTP/2. + ;; + *) + export GIT_TEST_HTTPD=true + ;; + esac # The Linux build installs the defined dependency versions below. # The OS X build installs much more recent versions, whichever -- cgit v1.2.3