mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
![Patrick Steinhardt](/assets/img/avatar_default.png)
We already support Azure Pipelines and GitHub Workflows in the Git project, but until now we do not have support for GitLab CI. While it is arguably not in the interest of the Git project to maintain a ton of different CI platforms, GitLab has recently ramped up its efforts and tries to contribute to the Git project more regularly. Part of a problem we hit at GitLab rather frequently is that our own, custom CI setup we have is so different to the setup that the Git project has. More esoteric jobs like "linux-TEST-vars" that also set a couple of environment variables do not exist in GitLab's custom CI setup, and maintaining them to keep up with what Git does feels like wasted time. The result is that we regularly send patch series upstream that fail to compile or pass tests in GitHub Workflows. We would thus like to integrate the GitLab CI configuration into the Git project to help us send better patch series upstream and thus reduce overhead for the maintainer. Results of these pipeline runs will be made available (at least) in GitLab's mirror of the Git project at [1]. This commit introduces the integration into our regular CI scripts so that most of the setup continues to be shared across all of the CI solutions. Note that as the builds on GitLab CI run as unprivileged user, we need to pull in both sudo and shadow packages to our Alpine based job to set this up. [1]: https://gitlab.com/gitlab-org/git Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
42 lines
1.3 KiB
Bash
Executable file
42 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Install dependencies required to build and test Git inside container
|
|
#
|
|
|
|
. ${0%/*}/lib.sh
|
|
|
|
begin_group "Install dependencies"
|
|
|
|
case "$jobname" in
|
|
linux32)
|
|
linux32 --32bit i386 sh -c '
|
|
apt update >/dev/null &&
|
|
apt install -y build-essential libcurl4-openssl-dev \
|
|
libssl-dev libexpat-dev gettext python >/dev/null
|
|
'
|
|
;;
|
|
linux-musl)
|
|
apk add --update shadow sudo build-base curl-dev openssl-dev expat-dev gettext \
|
|
pcre2-dev python3 musl-libintl perl-utils ncurses \
|
|
apache2 apache2-http2 apache2-proxy apache2-ssl apache2-webdav apr-util-dbd_sqlite3 \
|
|
bash cvs gnupg perl-cgi perl-dbd-sqlite >/dev/null
|
|
;;
|
|
linux-*)
|
|
# Required so that apt doesn't wait for user input on certain packages.
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
apt update -q &&
|
|
apt install -q -y sudo git make language-pack-is libsvn-perl apache2 libssl-dev \
|
|
libcurl4-openssl-dev libexpat-dev tcl tk gettext zlib1g-dev \
|
|
perl-modules liberror-perl libauthen-sasl-perl libemail-valid-perl \
|
|
libdbd-sqlite3-perl libio-socket-ssl-perl libnet-smtp-ssl-perl ${CC_PACKAGE:-${CC:-gcc}} \
|
|
apache2 cvs cvsps gnupg libcgi-pm-perl subversion
|
|
;;
|
|
pedantic)
|
|
dnf -yq update >/dev/null &&
|
|
dnf -yq install make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
|
|
;;
|
|
esac
|
|
|
|
end_group "Install dependencies"
|