]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci: install JGit dependency
authorPatrick Steinhardt <ps@pks.im>
Fri, 12 Apr 2024 04:44:43 +0000 (06:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Apr 2024 15:47:50 +0000 (08:47 -0700)
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 <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/install-dependencies.sh

index 0b9bb686d8c17d08f323203bcb963810373054af..c196e56762011a344ee42bef679e106cc97b8801 100755 (executable)
@@ -9,6 +9,7 @@ begin_group "Install dependencies"
 
 P4WHENCE=https://cdist2.perforce.com/perforce/r21.2
 LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
+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
 
 # Make sudo a no-op and execute the command directly when running as root.
 # While using sudo would be fine on most platforms when we are root already,
@@ -39,7 +40,7 @@ ubuntu-*)
        sudo apt-get -q update
        sudo apt-get -q -y install \
                language-pack-is libsvn-perl apache2 cvs cvsps git gnupg subversion \
-               make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo \
+               make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo default-jre \
                tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \
                libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \
                ${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
@@ -53,6 +54,9 @@ ubuntu-*)
        tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \
                -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
        rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
+
+       wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit"
+       chmod a+x "$CUSTOM_PATH/jgit"
        ;;
 ubuntu32-*)
        sudo linux32 --32bit i386 sh -c '
@@ -113,6 +117,7 @@ then
 else
        echo >&2 "WARNING: perforce wasn't installed, see above for clues why"
 fi
+
 if type git-lfs >/dev/null 2>&1
 then
        echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
@@ -121,4 +126,12 @@ else
        echo >&2 "WARNING: git-lfs wasn't installed, see above for clues why"
 fi
 
+if type jgit >/dev/null 2>&1
+then
+       echo "$(tput setaf 6)JGit Version$(tput sgr0)"
+       jgit version
+else
+       echo >&2 "WARNING: JGit wasn't installed, see above for clues why"
+fi
+
 end_group "Install dependencies"