@@ -97,17 +97,16 @@ REPLAY_WORKED=
97
97
# If this step is successful, then the process can exit as it's ready.
98
98
if [[ " $executables_replay " == " $executables_vanilla " ]]
99
99
then
100
- echo " Replay worked"
101
- echo " Vanilla compile time: ${B_TIME} "
102
- echo " Replay compile time: ${R_TIME} "
103
-
104
100
REPLAY_WORKED=1
105
101
106
102
if [ -z " ${RUN_ALL+1} " ]; then
103
+ echo " ${_PROJECT} : Replay worked."
104
+ echo " ${_PROJECT} : Compile times: Vanilla=${B_TIME} ; Replay=${R_TIME} ;"
107
105
exit 0
108
106
fi
109
107
else
110
- echo " Replay did not work"
108
+ echo " ${_PROJECT} : Replay did not work"
109
+ R_TIME=" N/A"
111
110
fi
112
111
113
112
# Step 8: prepare Dockerfile for ccache
@@ -145,25 +144,22 @@ executables_ccache="$(find ./build/out/${_PROJECT}/ -executable -type f | sort)"
145
144
# Step 12: validate the ccache builds are successful
146
145
if [[ " $executables_ccache " == " $executables_vanilla " ]]
147
146
then
148
- echo " Vanilla compile time: ${B_TIME} "
149
- if [[ " $executables_replay " == " $executables_vanilla " ]]
150
- then
151
- echo " Replay worked"
152
- echo " Replay compile time: ${R_TIME} "
153
- fi
147
+ echo " ${_PROJECT} : Compile times: Vanilla=${B_TIME} ; Replay=${R_TIME} ; CCache=${A_TIME} ;"
154
148
155
- echo " Ccache compile time: ${A_TIME} "
149
+ if [[ -z " ${REPLAY_WORKED} " || ${R_TIME} -gt ${A_TIME} ]]; then
150
+ if [ ${R_TIME} -gt ${A_TIME} ]; then
151
+ echo " Replay was slower than ccache."
152
+ fi
156
153
157
- if [ -z " ${REPLAY_WORKED} " ]; then
158
- # Replay didn't work, so make the default "cached" image use the ccache one.
154
+ # Replay didn't work or was slower, so make the default "cached" image use the ccache one.
159
155
docker image tag \
160
156
$CCACHE_IMAGE_NAME \
161
157
$FINAL_IMAGE_NAME
162
158
fi
163
159
164
160
exit 0
165
161
else
166
- echo " Replay and ccaching did not work."
162
+ echo " ${_PROJECT} : Replay and ccaching did not work."
167
163
exit 1
168
164
fi
169
165
0 commit comments