From: Patrick Steinhardt <ps@pks.im>
To: "Matthias Aßhauer" <mha1993@live.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3] ci: make p4 setup on macOS more robust
Date: Thu, 18 Jan 2024 10:44:44 +0100 [thread overview]
Message-ID: <ZajzDNR1MtbV7zxp@tanuki> (raw)
In-Reply-To: <DB9P250MB0692629640B05593B798E5A0A5712@DB9P250MB0692.EURP250.PROD.OUTLOOK.COM>
[-- Attachment #1: Type: text/plain, Size: 2286 bytes --]
On Thu, Jan 18, 2024 at 08:19:10AM +0100, Matthias Aßhauer wrote:
>
>
> On Mon, 15 Jan 2024, Patrick Steinhardt wrote:
>
> > When setting up Perforce on macOS we put both `p4` and `p4d` into
> > "$HOME/bin". On GitHub CI this directory is indeed contained in the PATH
> > environment variable and thus there is no need for additional setup than
> > to put the binaries there. But GitLab CI does not do this, and thus our
> > Perforce-based tests would be skipped there even though we download the
> > binaries.
> >
> > Refactor the setup code to become more robust by downloading binaries
> > into a separate directory which we then manually append to our PATH.
> > This matches what we do on Linux-based jobs.
> >
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> > ---
> > ci/install-dependencies.sh | 10 ++++------
> > ci/lib.sh | 3 +++
> > 2 files changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> > index 4f407530d3..b4e22de3cb 100755
> > --- a/ci/install-dependencies.sh
> > +++ b/ci/install-dependencies.sh
> > @@ -37,15 +37,13 @@ macos-*)
> > test -z "$BREW_INSTALL_PACKAGES" ||
> > brew install $BREW_INSTALL_PACKAGES
> > brew link --force gettext
> > - mkdir -p $HOME/bin
> > - (
> > - cd $HOME/bin
> > +
> > + mkdir -p "$P4_PATH"
> > + pushd "$P4_PATH"
> > wget -q "$P4WHENCE/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
>
> Didn't this put "$HOME/bin" on the PATH? And isn't the main premise of this
> patch that "$HOME/bin" is not on the PATH?
> or is the issue mainly about where we modify and export PATH and was masked
> by GitHub Actions already having "$HOME/bin" on the PATH?
Yes and no. While these lines put it in PATH, this only works inside of
"ci/install-dependencies.sh". When we call "ci/run-build-and-test.sh" we
do not source this script though, which means that "$HOME/bin" will not
be part of PATH during the actual test run unless it was already added
by the CI.
I'll update the commit message to explain this better.
Patrick
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-01-18 9:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 11:44 [PATCH 0/3] ci: add support for macOS to GitLab CI Patrick Steinhardt
2024-01-15 11:44 ` [PATCH 1/3] ci: make p4 setup on macOS more robust Patrick Steinhardt
2024-01-18 7:19 ` Matthias Aßhauer
2024-01-18 9:44 ` Patrick Steinhardt [this message]
2024-01-15 11:45 ` [PATCH 2/3] Makefile: detect new Homebrew location for ARM-based Macs Patrick Steinhardt
2024-01-15 11:45 ` [PATCH 3/3] ci: add macOS jobs to GitLab CI Patrick Steinhardt
2024-01-16 14:58 ` Phillip Wood
2024-01-17 7:34 ` Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 0/5] ci: add support for macOS " Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 1/5] t7527: decrease likelihood of racing with fsmonitor daemon Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 2/5] Makefile: detect new Homebrew location for ARM-based Macs Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 3/5] ci: handle TEST_OUTPUT_DIRECTORY when printing test failures Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 4/5] ci: make p4 setup on macOS more robust Patrick Steinhardt
2024-01-18 10:23 ` [PATCH v2 5/5] ci: add macOS jobs to GitLab CI Patrick Steinhardt
2024-01-21 14:50 ` [PATCH v2 0/5] ci: add support for macOS " Phillip Wood
2024-01-22 6:14 ` Patrick Steinhardt
2024-01-22 15:44 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZajzDNR1MtbV7zxp@tanuki \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=mha1993@live.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).