@@ -112,6 +112,27 @@ if [ -z "${CMAKE}" ]; then
112
112
fi
113
113
fi
114
114
115
+ function start_output_group() {
116
+ end_output_group
117
+ set +x
118
+ if [[ -v GITHUB_ACTIONS ]]; then
119
+ echo " ::group::$1 "
120
+ export IN_GROUP=1
121
+ else
122
+ echo " --- $1 "
123
+ fi
124
+ set -x
125
+ }
126
+
127
+ function end_output_group() {
128
+ set +x
129
+ if [[ -v GITHUB_ACTIONS ]] && [[ -v IN_GROUP ]]; then
130
+ echo " ::endgroup::"
131
+ unset IN_GROUP
132
+ fi
133
+ set -x
134
+ }
135
+
115
136
function clean() {
116
137
rm -rf " ${BUILD_DIR} "
117
138
}
@@ -125,7 +146,7 @@ if [ -n "${ENABLE_STD_MODULES}" ]; then
125
146
fi
126
147
127
148
function generate-cmake-base() {
128
- echo " --- Generating CMake"
149
+ start_output_group " Generating CMake"
129
150
${CMAKE} \
130
151
-S " ${MONOREPO_ROOT} /runtimes" \
131
152
-B " ${BUILD_DIR} " \
@@ -139,6 +160,7 @@ function generate-cmake-base() {
139
160
${ENABLE_STD_MODULES} \
140
161
-DLLVM_LIT_ARGS=" -sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
141
162
" ${@ } "
163
+ end_output_group
142
164
}
143
165
144
166
function generate-cmake() {
@@ -164,13 +186,19 @@ function generate-cmake-android() {
164
186
}
165
187
166
188
function check-runtimes() {
167
- echo " +++ Running the libc++ tests"
189
+ start_output_group " Building libc++ & libc++abi"
190
+ ${NINJA} -vC " ${BUILD_DIR} " cxx cxxabi
191
+
192
+ start_output_group " Building libc++ test deps"
193
+ ${NINJA} -vC " ${BUILD_DIR} " cxx-test-depends
194
+
195
+ start_output_group " Running the libc++ tests"
168
196
${NINJA} -vC " ${BUILD_DIR} " check-cxx
169
197
170
- echo " +++ Running the libc++abi tests"
198
+ start_output_group " Running the libc++abi tests"
171
199
${NINJA} -vC " ${BUILD_DIR} " check-cxxabi
172
200
173
- echo " +++ Running the libunwind tests"
201
+ start_output_group " Running the libunwind tests"
174
202
${NINJA} -vC " ${BUILD_DIR} " check-unwind
175
203
176
204
# TODO: On macOS 13.5, the linker seems to have an issue where it will pick up
@@ -183,23 +211,25 @@ function check-runtimes() {
183
211
# It should be possible to move this installation step back to the top once
184
212
# that issue has been resolved, but in the meantime it doesn't really hurt to
185
213
# have it here.
186
- echo " --- Installing libc++, libc++abi and libunwind to a fake location"
214
+ start_output_group " Installing libc++, libc++abi and libunwind to a fake location"
187
215
${NINJA} -vC " ${BUILD_DIR} " install-cxx install-cxxabi install-unwind
216
+
217
+ end_output_group
188
218
}
189
219
190
220
# TODO: The goal is to test this against all configurations. We should also move
191
221
# this to the Lit test suite instead of being a separate CMake target.
192
222
function check-abi-list() {
193
- echo " +++ Running the libc++ ABI list test"
223
+ start_output_group " Running the libc++ ABI list test"
194
224
${NINJA} -vC " ${BUILD_DIR} " check-cxx-abilist || (
195
- echo " +++ Generating the libc++ ABI list after failed check"
225
+ echo " ::error:: Generating the libc++ ABI list after failed check"
196
226
${NINJA} -vC " ${BUILD_DIR} " generate-cxx-abilist
197
227
false
198
228
)
199
229
}
200
230
201
231
function check-cxx-benchmarks() {
202
- echo " --- Running the benchmarks"
232
+ start_output_group " Running the benchmarks"
203
233
${NINJA} -vC " ${BUILD_DIR} " check-cxx-benchmarks
204
234
}
205
235
@@ -341,7 +371,7 @@ generic-ubsan)
341
371
bootstrapping-build)
342
372
clean
343
373
344
- echo " --- Generating CMake"
374
+ start_output_group " Generating CMake"
345
375
${CMAKE} \
346
376
-S " ${MONOREPO_ROOT} /llvm" \
347
377
-B " ${BUILD_DIR} " \
@@ -357,13 +387,15 @@ bootstrapping-build)
357
387
-DLLVM_ENABLE_ASSERTIONS=ON \
358
388
-DLLVM_LIT_ARGS=" -sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
359
389
360
- echo " +++ Running the libc++ and libc++abi tests"
390
+ start_output_group " Running the libc++ and libc++abi tests"
361
391
${NINJA} -vC " ${BUILD_DIR} " check-runtimes
362
392
363
- echo " --- Installing libc++ and libc++abi to a fake location"
393
+ start_output_group " Installing libc++ and libc++abi to a fake location"
364
394
${NINJA} -vC " ${BUILD_DIR} " install-runtimes
365
395
366
396
ccache -s
397
+
398
+ end_output_group
367
399
;;
368
400
generic-static)
369
401
clean
@@ -500,11 +532,12 @@ apple-system-backdeployment-hardened-*)
500
532
clean
501
533
502
534
if [[ " ${OSX_ROOTS} " == " " ]]; then
503
- echo " --- Downloading previous macOS dylibs"
535
+ start_output_group " Downloading previous macOS dylibs"
504
536
PREVIOUS_DYLIBS_URL=" https://dl.dropboxusercontent.com/s/gmcfxwgl9f9n6pu/libcxx-roots.tar.gz"
505
537
OSX_ROOTS=" ${BUILD_DIR} /macos-roots"
506
538
mkdir -p " ${OSX_ROOTS} "
507
539
curl " ${PREVIOUS_DYLIBS_URL} " | tar -xz --strip-components=1 -C " ${OSX_ROOTS} "
540
+ end_output_group
508
541
fi
509
542
510
543
DEPLOYMENT_TARGET=" ${BUILDER# apple-system-backdeployment-hardened-} "
@@ -538,11 +571,12 @@ apple-system-backdeployment-*)
538
571
clean
539
572
540
573
if [[ " ${OSX_ROOTS} " == " " ]]; then
541
- echo " --- Downloading previous macOS dylibs"
574
+ start_output_group " Downloading previous macOS dylibs"
542
575
PREVIOUS_DYLIBS_URL=" https://dl.dropboxusercontent.com/s/gmcfxwgl9f9n6pu/libcxx-roots.tar.gz"
543
576
OSX_ROOTS=" ${BUILD_DIR} /macos-roots"
544
577
mkdir -p " ${OSX_ROOTS} "
545
578
curl " ${PREVIOUS_DYLIBS_URL} " | tar -xz --strip-components=1 -C " ${OSX_ROOTS} "
579
+ end_output_group
546
580
fi
547
581
548
582
DEPLOYMENT_TARGET=" ${BUILDER# apple-system-backdeployment-} "
@@ -621,7 +655,7 @@ armv7m-picolibc)
621
655
--install-dir " ${INSTALL_DIR} " \
622
656
--target armv7m-none-eabi
623
657
624
- echo " --- Generating CMake"
658
+ start_output_group " Generating CMake"
625
659
flags=" --sysroot=${INSTALL_DIR} "
626
660
${CMAKE} \
627
661
-S " ${MONOREPO_ROOT} /compiler-rt" \
0 commit comments