Subject: Re: CI Failures (osx with p4)

From: Junio C Hamano <[email-masked]>
Date: Sun, 16 Nov 2025 09:18:44 -0800

Koji Nakamaru <[email-masked]> writes:

> The cause might be that the macos-14 and later images are for arm64 [1],
> but install-dependencies.sh still downloads the x86_64 Perforce
> commands. This leads to Rosetta translation overhead. The arm64 Perforce
> commands can be downloaded with the following modification. I confirmed
> that this modified version runs without any error [2].
>
> [1]: https://github.com/actions/runner-images?tab=readme-ov-file#available-images
> [2]: https://github.com/KojiNakamaru/git/actions/runs/19407172619

Ah, sounds great.  Or switch to macos-14-large, which seems to be
still x86-64?  I have no strong preference, but given that newer
units are all running on Apple silicon, perhaps testing with them,
instead of what was discontinued a few years ago, may probably be
still a better choice.

> --
> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index 50628ee2dd..16ee593d30 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -7,7 +7,7 @@
>
>  begin_group "Install dependencies"
>
> -P4WHENCE=https://cdist2.perforce.com/perforce/r23.2
> +P4WHENCE=https://cdist2.perforce.com/perforce/r24.2

Just being curious, other than "because it is newer than r23.2", was
there a particular reason why r24.2 was picked?  It is not the
latest that has arm64 macos (r25.1 also has bin.macosx12arm64
subdirectory at the above distribution site), and r23.2 also has
bin.macosx12arm64 subdirectory, too, which makes the above update
curious if it comes without explanation, given that this would also
affect Ubuntu that slurps bin.linux26x86_64 from there.

>  LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
>  JGITWHENCE=https://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh
>  CARGO_MSRV_VERSION=0.18.4
> @@ -109,7 +109,7 @@ macos-*)
>   brew link --force gettext
>
>   mkdir -p "$CUSTOM_PATH"
> - wget -q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" &&
> + wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz" &&

You explained this change very well.  I didn't consider that the
rosetta-2 may get in the way.

>   tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d &&
>   sudo xattr -d com.apple.quarantine "$CUSTOM_PATH/p4"
> "$CUSTOM_PATH/p4d" 2>/dev/null || true
>   rm helix-core-server.tgz

Thanks.