1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-08 20:16:10 +02:00

Merge branch 'cb/ci-make-p4-optional' into next

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
This commit is contained in:
Junio C Hamano 2022-05-13 14:32:01 -07:00
commit 7e84679e2a

View File

@ -5,7 +5,7 @@
. ${0%/*}/lib.sh . ${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 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 UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl
@ -37,13 +37,15 @@ macos-latest)
test -z "$BREW_INSTALL_PACKAGES" || test -z "$BREW_INSTALL_PACKAGES" ||
brew install $BREW_INSTALL_PACKAGES brew install $BREW_INSTALL_PACKAGES
brew link --force gettext brew link --force gettext
brew install --cask --no-quarantine perforce || { mkdir -p $HOME/bin
# Update the definitions and try again (
cask_repo="$(brew --repository)"/Library/Taps/homebrew/homebrew-cask && cd $HOME/bin
git -C "$cask_repo" pull --no-stat --ff-only && wget -q "https://cdist2.perforce.com/perforce/r21.2/bin.macosx1015x86_64/helix-core-server.tgz" &&
brew install --cask --no-quarantine perforce tar -xf helix-core-server.tgz &&
} || sudo xattr -d com.apple.quarantine p4 p4d 2>/dev/null || true
brew install homebrew/cask/perforce )
PATH="$PATH:${HOME}/bin"
export PATH
if test -n "$CC_PACKAGE" if test -n "$CC_PACKAGE"
then then
@ -78,15 +80,19 @@ linux-gcc-default)
;; ;;
esac esac
if type p4d >/dev/null && type p4 >/dev/null if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1
then then
echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)" echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
p4d -V | grep Rev. p4d -V | grep Rev.
echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)" echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
p4 -V | grep Rev. p4 -V | grep Rev.
else
echo >&2 "WARNING: perforce wasn't installed, see above for clues why"
fi fi
if type git-lfs >/dev/null if type git-lfs >/dev/null 2>&1
then then
echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)" echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
git-lfs version git-lfs version
else
echo >&2 "WARNING: git-lfs wasn't installed, see above for clues why"
fi fi