diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-01-26 08:54:47 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-01-26 08:54:47 -0800 |
| commit | 93bc02f8f958085aaa41ccfa2b3cb400405b7b34 (patch) | |
| tree | 341045265cb73a11bf6341983f425f8e125fbd8a /ci | |
| parent | Merge branch 'ps/completion-with-reftable-fix' (diff) | |
| parent | ci: add macOS jobs to GitLab CI (diff) | |
| download | git-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-x | ci/install-dependencies.sh | 10 | ||||
| -rwxr-xr-x | ci/lib.sh | 12 | ||||
| -rwxr-xr-x | ci/print-test-failures.sh | 2 |
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 @@ -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 |
