-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·95 lines (80 loc) · 2.88 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·95 lines (80 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
CONFIG="Release"
SIGNPOST_ARGS=""
for arg in "$@"; do
if [[ "$arg" == "--signpost" ]]; then
if [[ -n "$SIGNPOST_ARGS" ]]; then
echo "Error: --signpost and --timing are mutually exclusive"
exit 1
fi
SIGNPOST_ARGS="REPLAY_SIGNPOSTS_ENABLED_SETTING=1"
elif [[ "$arg" == "--timing" ]]; then
if [[ -n "$SIGNPOST_ARGS" ]]; then
echo "Error: --signpost and --timing are mutually exclusive"
exit 1
fi
SIGNPOST_ARGS="REPLAY_TIMING_ENABLED_SETTING=1"
elif [[ "$arg" == "Debug" || "$arg" == "Release" ]]; then
CONFIG="$arg"
else
echo "Usage: $0 [Debug|Release] [--signpost|--timing]"
echo " Default: Release"
echo " --signpost enable os_signpost intervals (view in Instruments.app)"
echo " --timing enable inline timing accumulators (prints to stderr)"
exit 1
fi
done
echo "Building all tools with configuration: $CONFIG"
echo "============================================"
cd "$(dirname "$0")"
any_failed=0
echo "------------------"
echo "** BUILD replay **"
build_log="/tmp/replay-build.log"
xcodebuild -project replay.xcodeproj -scheme replay -configuration "$CONFIG" $SIGNPOST_ARGS build | /usr/bin/tee "${build_log}" | /usr/bin/grep --invert-match -E -e '^ ' -e '^-'
result=$?
if [ $result != 0 ]; then
any_failed=1
echo "Failed build log saved in: ${build_log}"
else
/bin/rm -f "${build_log}"
fi
echo "------------------"
echo "** BUILD dispatch **"
build_log="/tmp/dispatch-build.log"
xcodebuild -project dispatch.xcodeproj -scheme dispatch -configuration "$CONFIG" $SIGNPOST_ARGS build | /usr/bin/tee "${build_log}" | /usr/bin/grep --invert-match -E -e '^ ' -e '^-'
result=$?
if [ $result != 0 ]; then
any_failed=1
echo "Failed build log saved in: ${build_log}"
else
/bin/rm -f "${build_log}"
fi
echo "------------------"
echo "** BUILD fingerprint **"
build_log="/tmp/fingerprint-build.log"
xcodebuild -project fingerprint.xcodeproj -scheme fingerprint -configuration "$CONFIG" $SIGNPOST_ARGS build | /usr/bin/tee "${build_log}" | /usr/bin/grep --invert-match -E -e '^ ' -e '^-'
result=$?
if [ $result != 0 ]; then
any_failed=1
echo "Failed build log saved in: ${build_log}"
else
/bin/rm -f "${build_log}"
fi
echo "------------------"
echo "** BUILD gate **"
build_log="/tmp/gate-build.log"
xcodebuild -project fingerprint.xcodeproj -scheme gate -configuration "$CONFIG" $SIGNPOST_ARGS build | /usr/bin/tee "${build_log}" | /usr/bin/grep --invert-match -E -e '^ ' -e '^-'
result=$?
if [ $result != 0 ]; then
any_failed=1
echo "Failed build log saved in: ${build_log}"
else
/bin/rm -f "${build_log}"
fi
echo "============================================"
if [ $any_failed == 0 ]; then
echo "All tools built successfully!"
else
echo "Some tools failed to build. Review failed build logs in /tmp"
fi