Skip to content

Commit 04ba2c7

Browse files
pks-tgitster
authored andcommitted
ci: install JGit dependency
We have some tests in t5310 that use JGit to verify that bitmaps can be read both by Git and by JGit. We do not execute these tests in our CI jobs though because we don't make JGit available there. Consequently, the tests basically bitrot because almost nobody is ever going to have JGit in their path. Install JGit to plug this test gap. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ca44ef3 commit 04ba2c7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

ci/install-dependencies.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ begin_group "Install dependencies"
99

1010
P4WHENCE=https://cdist2.perforce.com/perforce/r21.2
1111
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
12+
JGITWHENCE=https://repo.eclipse.org/content/groups/releases//org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh
1213

1314
# Make sudo a no-op and execute the command directly when running as root.
1415
# While using sudo would be fine on most platforms when we are root already,
@@ -39,7 +40,7 @@ ubuntu-*)
3940
sudo apt-get -q update
4041
sudo apt-get -q -y install \
4142
language-pack-is libsvn-perl apache2 cvs cvsps git gnupg subversion \
42-
make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo \
43+
make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo default-jre \
4344
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \
4445
libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \
4546
${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
@@ -53,6 +54,9 @@ ubuntu-*)
5354
tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \
5455
-C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
5556
rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
57+
58+
wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit"
59+
chmod a+x "$CUSTOM_PATH/jgit"
5660
;;
5761
ubuntu32-*)
5862
sudo linux32 --32bit i386 sh -c '
@@ -113,6 +117,7 @@ then
113117
else
114118
echo >&2 "WARNING: perforce wasn't installed, see above for clues why"
115119
fi
120+
116121
if type git-lfs >/dev/null 2>&1
117122
then
118123
echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
@@ -121,4 +126,12 @@ else
121126
echo >&2 "WARNING: git-lfs wasn't installed, see above for clues why"
122127
fi
123128

129+
if type jgit >/dev/null 2>&1
130+
then
131+
echo "$(tput setaf 6)JGit Version$(tput sgr0)"
132+
jgit version
133+
else
134+
echo >&2 "WARNING: JGit wasn't installed, see above for clues why"
135+
fi
136+
124137
end_group "Install dependencies"

0 commit comments

Comments
 (0)