aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-01-26 08:54:47 -0800
committerJunio C Hamano <gitster@pobox.com>2024-01-26 08:54:47 -0800
commit93bc02f8f958085aaa41ccfa2b3cb400405b7b34 (patch)
tree341045265cb73a11bf6341983f425f8e125fbd8a /ci
parentMerge branch 'ps/completion-with-reftable-fix' (diff)
parentci: add macOS jobs to GitLab CI (diff)
downloadgit-93bc02f8f958085aaa41ccfa2b3cb400405b7b34.tar.gz
git-93bc02f8f958085aaa41ccfa2b3cb400405b7b34.zip
Merge branch 'ps/gitlab-ci-macos'
CI for GitLab learned to drive macOS jobs. * ps/gitlab-ci-macos: ci: add macOS jobs to GitLab CI ci: make p4 setup on macOS more robust ci: handle TEST_OUTPUT_DIRECTORY when printing test failures Makefile: detect new Homebrew location for ARM-based Macs t7527: decrease likelihood of racing with fsmonitor daemon
Diffstat (limited to 'ci')
-rwxr-xr-xci/install-dependencies.sh10
-rwxr-xr-xci/lib.sh12
-rwxr-xr-xci/print-test-failures.sh2
3 files changed, 16 insertions, 8 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
+ popd
if test -n "$CC_PACKAGE"
then
diff --git a/ci/lib.sh b/ci/lib.sh
index c749b21366..d5dd2f2697 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -252,7 +252,14 @@ then
CI_COMMIT="$CI_COMMIT_SHA"
case "$CI_JOB_IMAGE" in
macos-*)
- CI_OS_NAME=osx;;
+ # GitLab CI has Python installed via multiple package managers,
+ # most notably via asdf and Homebrew. Ensure that our builds
+ # pick up the Homebrew one by prepending it to our PATH as the
+ # asdf one breaks tests.
+ export PATH="$(brew --prefix)/bin:$PATH"
+
+ CI_OS_NAME=osx
+ ;;
alpine:*|fedora:*|ubuntu:*)
CI_OS_NAME=linux;;
*)
@@ -344,6 +351,9 @@ macos-*)
then
MAKEFLAGS="$MAKEFLAGS APPLE_COMMON_CRYPTO_SHA1=Yes"
fi
+
+ P4_PATH="$HOME/custom/p4"
+ export PATH="$P4_PATH:$PATH"
;;
esac
diff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh
index c33ad4e3a2..b1f80aeac3 100755
--- a/ci/print-test-failures.sh
+++ b/ci/print-test-failures.sh
@@ -8,7 +8,7 @@
# Tracing executed commands would produce too much noise in the loop below.
set +x
-cd t/
+cd "${TEST_OUTPUT_DIRECTORY:-t/}"
if ! ls test-results/*.exit >/dev/null 2>/dev/null
then