File tree Expand file tree Collapse file tree 3 files changed +54
-75
lines changed Expand file tree Collapse file tree 3 files changed +54
-75
lines changed Original file line number Diff line number Diff line change 13
13
# run only the relevant tests.
14
14
#
15
15
16
- set -ex
17
- set -o pipefail
16
+ source .ci/utils.sh
18
17
19
- MONOREPO_ROOT=" ${MONOREPO_ROOT:= " $( git rev-parse --show-toplevel) " } "
20
- BUILD_DIR=" ${BUILD_DIR:= ${MONOREPO_ROOT} / build} "
21
18
INSTALL_DIR=" ${BUILD_DIR} /install"
22
- rm -rf " ${BUILD_DIR} "
23
-
24
- sccache --zero-stats
25
19
26
20
mkdir -p artifacts/reproducers
27
21
28
- # Make sure any clang reproducers will end up as artifacts.
22
+ # Make sure any clang reproducers will end up as artifacts
29
23
export CLANG_CRASH_DIAGNOSTICS_DIR=` realpath artifacts/reproducers`
30
24
31
- function at-exit {
32
- retcode=$?
33
-
34
- sccache --show-stats > artifacts/sccache_stats.txt
35
- cp " ${BUILD_DIR} " /.ninja_log artifacts/.ninja_log
36
- cp " ${BUILD_DIR} " /test-results.* .xml artifacts/ || :
37
-
38
- # If building fails there will be no results files.
39
- shopt -s nullglob
40
-
41
- if [[ " $GITHUB_STEP_SUMMARY " != " " ]]; then
42
- python3 " ${MONOREPO_ROOT} " /.ci/generate_test_report_github.py \
43
- $retcode " ${BUILD_DIR} " /test-results.* .xml >> $GITHUB_STEP_SUMMARY
44
- fi
45
- }
46
- trap at-exit EXIT
47
-
48
- function start-group {
49
- groupname=$1
50
- if [[ " $GITHUB_ACTIONS " != " " ]]; then
51
- echo " ::endgroup"
52
- echo " ::group::$groupname "
53
- elif [[ " $POSTCOMMIT_CI " != " " ]]; then
54
- echo " @@@$STEP @@@"
55
- else
56
- echo " Starting $groupname "
57
- fi
58
- }
59
-
60
25
projects=" ${1} "
61
26
targets=" ${2} "
62
27
runtimes=" ${3} "
Original file line number Diff line number Diff line change 13
13
# run only the relevant tests.
14
14
#
15
15
16
- set -ex
17
- set -o pipefail
18
-
19
- MONOREPO_ROOT=" ${MONOREPO_ROOT:= " $( git rev-parse --show-toplevel) " } "
20
- BUILD_DIR=" ${BUILD_DIR:= ${MONOREPO_ROOT} / build} "
21
-
22
- rm -rf " ${BUILD_DIR} "
23
-
24
- sccache --zero-stats
25
- function at-exit {
26
- retcode=$?
27
-
28
- mkdir -p artifacts
29
- sccache --show-stats >> artifacts/sccache_stats.txt
30
- cp " ${BUILD_DIR} " /.ninja_log artifacts/.ninja_log
31
- cp " ${BUILD_DIR} " /test-results.* .xml artifacts/ || :
32
-
33
- # If building fails there will be no results files.
34
- shopt -s nullglob
35
-
36
- if [[ " $GITHUB_STEP_SUMMARY " != " " ]]; then
37
- python " ${MONOREPO_ROOT} " /.ci/generate_test_report_github.py \
38
- $retcode " ${BUILD_DIR} " /test-results.* .xml >> $GITHUB_STEP_SUMMARY
39
- fi
40
- }
41
- trap at-exit EXIT
42
-
43
- function start-group {
44
- groupname=$1
45
- if [[ " $GITHUB_ACTIONS " != " " ]]; then
46
- echo " ::endgroup"
47
- echo " ::group::$groupname "
48
- elif [[ " $POSTCOMMIT_CI " != " " ]]; then
49
- echo " @@@$STEP @@@"
50
- else
51
- echo " Starting $groupname "
52
- fi
53
- }
16
+ source .ci/utils.sh
54
17
55
18
projects=" ${1} "
56
19
targets=" ${2} "
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # ===----------------------------------------------------------------------===##
3
+ #
4
+ # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5
+ # See https://llvm.org/LICENSE.txt for license information.
6
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
+ #
8
+ # ===----------------------------------------------------------------------===##
9
+
10
+ # This script performs some setup and contains some utilities used for in the
11
+ # monolithic-linux.sh and monolithic-windows.sh scripts.
12
+
13
+ set -ex
14
+ set -o pipefail
15
+
16
+ MONOREPO_ROOT=" ${MONOREPO_ROOT:= " $( git rev-parse --show-toplevel) " } "
17
+ BUILD_DIR=" ${BUILD_DIR:= ${MONOREPO_ROOT} / build} "
18
+
19
+ rm -rf " ${BUILD_DIR} "
20
+
21
+ sccache --zero-stats
22
+
23
+ function at-exit {
24
+ retcode=$?
25
+
26
+ mkdir -p artifacts
27
+ sccache --show-stats >> artifacts/sccache_stats.txt
28
+ cp " ${BUILD_DIR} " /.ninja_log artifacts/.ninja_log
29
+ cp " ${BUILD_DIR} " /test-results.* .xml artifacts/ || :
30
+
31
+ # If building fails there will be no results files.
32
+ shopt -s nullglob
33
+
34
+ if [[ " $GITHUB_STEP_SUMMARY " != " " ]]; then
35
+ python " ${MONOREPO_ROOT} " /.ci/generate_test_report_github.py \
36
+ $retcode " ${BUILD_DIR} " /test-results.* .xml >> $GITHUB_STEP_SUMMARY
37
+ fi
38
+ }
39
+ trap at-exit EXIT
40
+
41
+ function start-group {
42
+ groupname=$1
43
+ if [[ " $GITHUB_ACTIONS " != " " ]]; then
44
+ echo " ::endgroup"
45
+ echo " ::group::$groupname "
46
+ elif [[ " $POSTCOMMIT_CI " != " " ]]; then
47
+ echo " @@@$STEP @@@"
48
+ else
49
+ echo " Starting $groupname "
50
+ fi
51
+ }
You can’t perform that action at this time.
0 commit comments