Skip to content

Commit 7cd8f1c

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9c26185 commit 7cd8f1c

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.gitlab-ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ test:linux:
2525
fi
2626
parallel:
2727
matrix:
28+
- jobname: linux-old
29+
image: ubuntu:16.04
30+
CC: gcc
2831
- jobname: linux-sha256
2932
image: ubuntu:latest
3033
CC: clang

ci/install-dependencies.sh

+5
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ ubuntu-*|ubuntu32-*)
5555
${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
5656

5757
case "$distro" in
58+
ubuntu-16.04)
59+
# Does not support JGit, but we also don't really care about
60+
# the others. We rather care whether Git still compiles and
61+
# runs fine overall.
62+
;;
5863
ubuntu-*)
5964
mkdir --parents "$CUSTOM_PATH"
6065

ci/lib.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,14 @@ ubuntu-*)
336336
fi
337337
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE"
338338

339-
export GIT_TEST_HTTPD=true
339+
case "$distro" in
340+
ubuntu-16.04)
341+
# Apache is too old for HTTP/2.
342+
;;
343+
*)
344+
export GIT_TEST_HTTPD=true
345+
;;
346+
esac
340347

341348
# The Linux build installs the defined dependency versions below.
342349
# The OS X build installs much more recent versions, whichever

0 commit comments

Comments
 (0)