This repository was archived by the owner on Apr 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # shellcheck disable=SC1117
3
+
4
+ function format_time() {(
5
+ MINS=$(( (${2} - ${1} ) / 60 ))
6
+ SECS=$(( (${2} - ${1} ) % 60 ))
7
+
8
+ if [[ ${MINS} -ge 60 ]]; then
9
+ HOURS=$(( MINS / 60 ))
10
+ MINS=$(( MINS % 60 ))
11
+ fi
12
+
13
+ [[ -n ${HOURS} ]] && TIME_STRING=" ${HOURS} h "
14
+ echo " ${TIME_STRING}${MINS} m ${SECS} s"
15
+ )}
16
+
17
+ BLD_ALL_START=$( date +%s)
18
+ GREEN=" \033[01;32m"
19
+ RED=" \033[01;31m"
20
+ RESET=" \033[0m"
21
+
22
+ echo
23
+ grep " env:" .travis.yml | grep -v LLVM_VERSION | sed " s/.*env: //g" | while read -r ITEM; do (
24
+ DRIVER_START=$( date +%s)
25
+ read -ra VALUES <<< " ${ITEM}"
26
+ for VALUE in " ${VALUES[@]} " ; do
27
+ export " ${VALUE:? } "
28
+ done
29
+
30
+ # Make sure that the version suffix is stripped for local builds,
31
+ # where it is assumed that the user will be using a tip of tree build
32
+ [[ -n ${LD} ]] && export LD=${LD// -* }
33
+
34
+ echo -e " Running '${ARCH: +ARCH=${ARCH} }${LD: +LD=${LD} }${REPO: +REPO=${REPO} } ./driver.sh'... \c"
35
+ if ! ./driver.sh " ${@ } " & > /dev/null; then
36
+ echo -e " ${RED} Failed${RESET} \c"
37
+ else
38
+ echo -e " ${GREEN} Successful${RESET} \c"
39
+ fi
40
+ echo " in $( format_time " ${DRIVER_START} " " $( date +%s) " ) "
41
+ ) done
42
+
43
+ echo
44
+ echo " Total script time: $( format_time " ${BLD_ALL_START} " " $( date +%s) " ) "
45
+ echo
You can’t perform that action at this time.
0 commit comments