File tree Expand file tree Collapse file tree 6 files changed +63
-10
lines changed Expand file tree Collapse file tree 6 files changed +63
-10
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ workflow:
7
7
- if : $CI_COMMIT_TAG
8
8
- if : $CI_COMMIT_REF_PROTECTED == "true"
9
9
10
- test :
10
+ test:linux :
11
11
image : $image
12
12
before_script :
13
13
- ./ci/install-docker-dependencies.sh
52
52
- t/failed-test-artifacts
53
53
when : on_failure
54
54
55
+ test:osx :
56
+ image : $image
57
+ tags :
58
+ - saas-macos-medium-m1
59
+ variables :
60
+ TEST_OUTPUT_DIRECTORY : " /Volumes/RAMDisk"
61
+ before_script :
62
+ # Create a 4GB RAM disk that we use to store test output on. This small hack
63
+ # significantly speeds up tests by more than a factor of 2 because the
64
+ # macOS runners use network-attached storage as disks, which is _really_
65
+ # slow with the many small writes that our tests do.
66
+ - sudo diskutil apfs create $(hdiutil attach -nomount ram://8192000) RAMDisk
67
+ - ./ci/install-dependencies.sh
68
+ script :
69
+ - ./ci/run-build-and-tests.sh
70
+ after_script :
71
+ - |
72
+ if test "$CI_JOB_STATUS" != 'success'
73
+ then
74
+ ./ci/print-test-failures.sh
75
+ mv "$TEST_OUTPUT_DIRECTORY"/failed-test-artifacts t/
76
+ fi
77
+ parallel :
78
+ matrix :
79
+ - jobname : osx-clang
80
+ image : macos-13-xcode-14
81
+ CC : clang
82
+ artifacts :
83
+ paths :
84
+ - t/failed-test-artifacts
85
+ when : on_failure
86
+
55
87
static-analysis :
56
88
image : ubuntu:22.04
57
89
variables :
Original file line number Diff line number Diff line change @@ -37,15 +37,13 @@ macos-*)
37
37
test -z " $BREW_INSTALL_PACKAGES " ||
38
38
brew install $BREW_INSTALL_PACKAGES
39
39
brew link --force gettext
40
- mkdir -p $HOME /bin
41
- (
42
- cd $HOME /bin
40
+
41
+ mkdir -p " $P4_PATH "
42
+ pushd " $P4_PATH "
43
43
wget -q " $P4WHENCE /bin.macosx1015x86_64/helix-core-server.tgz" &&
44
44
tar -xf helix-core-server.tgz &&
45
45
sudo xattr -d com.apple.quarantine p4 p4d 2> /dev/null || true
46
- )
47
- PATH=" $PATH :${HOME} /bin"
48
- export PATH
46
+ popd
49
47
50
48
if test -n " $CC_PACKAGE "
51
49
then
Original file line number Diff line number Diff line change @@ -252,7 +252,14 @@ then
252
252
CI_COMMIT=" $CI_COMMIT_SHA "
253
253
case " $CI_JOB_IMAGE " in
254
254
macos-* )
255
- CI_OS_NAME=osx;;
255
+ # GitLab CI has Python installed via multiple package managers,
256
+ # most notably via asdf and Homebrew. Ensure that our builds
257
+ # pick up the Homebrew one by prepending it to our PATH as the
258
+ # asdf one breaks tests.
259
+ export PATH=" $( brew --prefix) /bin:$PATH "
260
+
261
+ CI_OS_NAME=osx
262
+ ;;
256
263
alpine:* |fedora:* |ubuntu:* )
257
264
CI_OS_NAME=linux;;
258
265
* )
@@ -344,6 +351,9 @@ macos-*)
344
351
then
345
352
MAKEFLAGS=" $MAKEFLAGS APPLE_COMMON_CRYPTO_SHA1=Yes"
346
353
fi
354
+
355
+ P4_PATH=" $HOME /custom/p4"
356
+ export PATH=" $P4_PATH :$PATH "
347
357
;;
348
358
esac
349
359
Original file line number Diff line number Diff line change 8
8
# Tracing executed commands would produce too much noise in the loop below.
9
9
set +x
10
10
11
- cd t/
11
+ cd " ${TEST_OUTPUT_DIRECTORY :- t / } "
12
12
13
13
if ! ls test-results/* .exit > /dev/null 2> /dev/null
14
14
then
Original file line number Diff line number Diff line change @@ -158,6 +158,19 @@ ifeq ($(uname_S),Darwin)
158
158
ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y)
159
159
MSGFMT = /usr/local/opt/gettext/bin/msgfmt
160
160
endif
161
+ # On newer ARM-based machines the default installation path has changed to
162
+ # /opt/homebrew. Include it in our search paths so that the user does not
163
+ # have to configure this manually.
164
+ #
165
+ # Note that we do not employ the same workaround as above where we manually
166
+ # add gettext. The issue was fixed more than three years ago by now, and at
167
+ # that point there haven't been any ARM-based Macs yet.
168
+ else ifeq ($(shell test -d /opt/homebrew/ && echo y),y)
169
+ BASIC_CFLAGS += -I/opt/homebrew/include
170
+ BASIC_LDFLAGS += -L/opt/homebrew/lib
171
+ ifeq ($(shell test -x /opt/homebrew/bin/msgfmt && echo y),y)
172
+ MSGFMT = /opt/homebrew/bin/msgfmt
173
+ endif
161
174
endif
162
175
163
176
# The builtin FSMonitor on MacOS builds upon Simple-IPC. Both require
Original file line number Diff line number Diff line change @@ -978,7 +978,7 @@ test_expect_success !UNICODE_COMPOSITION_SENSITIVE 'Unicode nfc/nfd' '
978
978
mkdir test_unicode/nfd &&
979
979
mkdir test_unicode/nfd/d_${utf8_nfd} &&
980
980
981
- git -C test_unicode fsmonitor--daemon stop &&
981
+ test-tool -C test_unicode fsmonitor-client query --token 0 &&
982
982
983
983
if test_have_prereq UNICODE_NFC_PRESERVED
984
984
then
You can’t perform that action at this time.
0 commit comments