Skip to content

Commit 31a1952

Browse files
jiangxingitster
authored andcommitted
ci: use the same version of p4 on both Linux and macOS
There would be a segmentation fault when running p4 v16.2 on ubuntu 22.04 which is the latest version of ubuntu runner image for github actions. By checking each version from [1], p4d version 21.1 and above can work properly on ubuntu 22.04. But version 22.x will break some p4 test cases. So p4 version 21.x is exactly the version we can use. With this update, the versions of p4 for Linux and macOS happen to be the same. So we can add the version number directly into the "P4WHENCE" variable, and reuse it in p4 installation for macOS. By removing the "LINUX_P4_VERSION" variable from "ci/lib.sh", the comment left above has nothing to do with p4, but still applies to git-lfs. Since we have a fixed version of git-lfs installed on Linux, we may have a different version on macOS. [1]: https://cdist2.perforce.com/perforce/ Reviewed-by: Johannes Schindelin <[email protected]> Helped-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Jiang Xin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4137c84 commit 31a1952

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ci/install-dependencies.sh

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

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

8-
P4WHENCE=https://cdist2.perforce.com/perforce/r$LINUX_P4_VERSION
8+
P4WHENCE=https://cdist2.perforce.com/perforce/r21.2
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
@@ -40,7 +40,7 @@ macos-latest)
4040
mkdir -p $HOME/bin
4141
(
4242
cd $HOME/bin
43-
wget -q "https://cdist2.perforce.com/perforce/r21.2/bin.macosx1015x86_64/helix-core-server.tgz" &&
43+
wget -q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" &&
4444
tar -xf helix-core-server.tgz &&
4545
sudo xattr -d com.apple.quarantine p4 p4d 2>/dev/null || true
4646
)

ci/lib.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ ubuntu-*)
246246
# were recorded in the Homebrew database upon creating the OS X
247247
# image.
248248
# Keep that in mind when you encounter a broken OS X build!
249-
export LINUX_P4_VERSION="16.2"
250249
export LINUX_GIT_LFS_VERSION="1.5.2"
251250

252251
P4_PATH="$HOME/custom/p4"

0 commit comments

Comments
 (0)