Skip to content

Commit 080b062

Browse files
committed
Merge branch 'cb/ci-make-p4-optional' into maint
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. source: <[email protected]> * 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
2 parents f02e234 + f15e00b commit 080b062

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

ci/install-dependencies.sh

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
. ${0%/*}/lib.sh
77

8-
P4WHENCE=http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION
8+
P4WHENCE=https://cdist2.perforce.com/perforce/r$LINUX_P4_VERSION
99
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
1010
UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev
1111
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl
@@ -37,13 +37,15 @@ macos-latest)
3737
test -z "$BREW_INSTALL_PACKAGES" ||
3838
brew install $BREW_INSTALL_PACKAGES
3939
brew link --force gettext
40-
brew install --cask --no-quarantine perforce || {
41-
# Update the definitions and try again
42-
cask_repo="$(brew --repository)"/Library/Taps/homebrew/homebrew-cask &&
43-
git -C "$cask_repo" pull --no-stat --ff-only &&
44-
brew install --cask --no-quarantine perforce
45-
} ||
46-
brew install homebrew/cask/perforce
40+
mkdir -p $HOME/bin
41+
(
42+
cd $HOME/bin
43+
wget -q "https://cdist2.perforce.com/perforce/r21.2/bin.macosx1015x86_64/helix-core-server.tgz" &&
44+
tar -xf helix-core-server.tgz &&
45+
sudo xattr -d com.apple.quarantine p4 p4d 2>/dev/null || true
46+
)
47+
PATH="$PATH:${HOME}/bin"
48+
export PATH
4749

4850
if test -n "$CC_PACKAGE"
4951
then
@@ -78,15 +80,19 @@ linux-gcc-default)
7880
;;
7981
esac
8082

81-
if type p4d >/dev/null && type p4 >/dev/null
83+
if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1
8284
then
8385
echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
8486
p4d -V | grep Rev.
8587
echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
8688
p4 -V | grep Rev.
89+
else
90+
echo >&2 "WARNING: perforce wasn't installed, see above for clues why"
8791
fi
88-
if type git-lfs >/dev/null
92+
if type git-lfs >/dev/null 2>&1
8993
then
9094
echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
9195
git-lfs version
96+
else
97+
echo >&2 "WARNING: git-lfs wasn't installed, see above for clues why"
9298
fi

0 commit comments

Comments
 (0)