summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-20 15:27:00 -0700
committerJunio C Hamano <gitster@pobox.com>2022-05-20 15:27:00 -0700
commit69e3d1e550a6ab05762ec1ad84f985a68ff779f1 (patch)
treeefd0ba8fa7ee3fb1efc510fcbca4f86d7ed97c46 /ci
parent3af1df0415741c85f84e78e281339186be1d05d7 (diff)
parentf15e00b463b4dceaf5b260883975e93c24581b2c (diff)
downloadgit-69e3d1e550a6ab05762ec1ad84f985a68ff779f1.tar.gz
Merge branch 'cb/ci-make-p4-optional'
macOS CI jobs have been occasionally flaky due to tentative version skew between perforce and the homebrew packager. Instead of failing the whole CI job, just let it skip the p4 tests when this happens. * cb/ci-make-p4-optional: ci: use https, not http to download binaries from perforce.com ci: reintroduce prevention from perforce being quarantined in macOS ci: avoid brew for installing perforce ci: make failure to find perforce more user friendly
Diffstat (limited to 'ci')
-rwxr-xr-xci/install-dependencies.sh26
1 files changed, 16 insertions, 10 deletions
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index dbcebad2fb..107757a1fe 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -5,7 +5,7 @@
. ${0%/*}/lib.sh
-P4WHENCE=http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION
+P4WHENCE=https://cdist2.perforce.com/perforce/r$LINUX_P4_VERSION
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl
@@ -37,13 +37,15 @@ macos-latest)
test -z "$BREW_INSTALL_PACKAGES" ||
brew install $BREW_INSTALL_PACKAGES
brew link --force gettext
- brew install --cask --no-quarantine perforce || {
- # Update the definitions and try again
- cask_repo="$(brew --repository)"/Library/Taps/homebrew/homebrew-cask &&
- git -C "$cask_repo" pull --no-stat --ff-only &&
- brew install --cask --no-quarantine perforce
- } ||
- brew install homebrew/cask/perforce
+ mkdir -p $HOME/bin
+ (
+ cd $HOME/bin
+ wget -q "https://cdist2.perforce.com/perforce/r21.2/bin.macosx1015x86_64/helix-core-server.tgz" &&
+ tar -xf helix-core-server.tgz &&
+ sudo xattr -d com.apple.quarantine p4 p4d 2>/dev/null || true
+ )
+ PATH="$PATH:${HOME}/bin"
+ export PATH
if test -n "$CC_PACKAGE"
then
@@ -78,15 +80,19 @@ linux-gcc-default)
;;
esac
-if type p4d >/dev/null && type p4 >/dev/null
+if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1
then
echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
p4d -V | grep Rev.
echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
p4 -V | grep Rev.
+else
+ echo >&2 "WARNING: perforce wasn't installed, see above for clues why"
fi
-if type git-lfs >/dev/null
+if type git-lfs >/dev/null 2>&1
then
echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
git-lfs version
+else
+ echo >&2 "WARNING: git-lfs wasn't installed, see above for clues why"
fi