@@ -24,8 +24,6 @@ OPTIONS:
2424 Show this message
2525 -c, --clean
2626 Issue a clean before the normal build.
27- -a, --autogen
28- Start by rerunning autogen & configure.
2927 -r, --regenerate-descriptors
3028 Run generate_descriptor_proto.sh to regenerate all the checked in
3129 proto sources.
@@ -60,25 +58,7 @@ header() {
6058 echo " ========================================================================"
6159}
6260
63- # Thanks to libtool, builds can fail in odd ways and since it eats some output
64- # it can be hard to spot, so force error output if make exits with a non zero.
65- wrapped_make () {
66- set +e # Don't stop if the command fails.
67- make $*
68- MAKE_EXIT_STATUS=$?
69- if [ ${MAKE_EXIT_STATUS} -ne 0 ]; then
70- echo " Error: 'make $* ' exited with status ${MAKE_EXIT_STATUS} "
71- exit ${MAKE_EXIT_STATUS}
72- fi
73- set -e
74- }
75-
76- NUM_MAKE_JOBS=$( /usr/sbin/sysctl -n hw.ncpu)
77- if [[ " ${NUM_MAKE_JOBS} " -lt 2 ]] ; then
78- NUM_MAKE_JOBS=2
79- fi
80-
81- DO_AUTOGEN=no
61+ NUM_JOBS=auto
8262DO_CLEAN=no
8363REGEN_DESCRIPTORS=no
8464CORE_ONLY=no
@@ -98,15 +78,12 @@ while [[ $# != 0 ]]; do
9878 -c | --clean )
9979 DO_CLEAN=yes
10080 ;;
101- -a | --autogen )
102- DO_AUTOGEN=yes
103- ;;
10481 -r | --regenerate-descriptors )
10582 REGEN_DESCRIPTORS=yes
10683 ;;
10784 -j | --jobs )
10885 shift
109- NUM_MAKE_JOBS =" ${1} "
86+ NUM_JOBS =" ${1} "
11087 ;;
11188 --core-only )
11289 CORE_ONLY=yes
@@ -154,21 +131,9 @@ done
154131# Into the proto dir.
155132cd " ${ProtoRootDir} "
156133
157- # if no Makefile, force the autogen.
158- if [[ ! -f Makefile ]] ; then
159- DO_AUTOGEN=yes
160- fi
161-
162- if [[ " ${DO_AUTOGEN} " == " yes" ]] ; then
163- header " Running autogen & configure"
164- ./autogen.sh
165- ./configure \
166- CPPFLAGS=" -mmacosx-version-min=10.9 -Wunused-const-variable -Wunused-function"
167- fi
168-
169134if [[ " ${DO_CLEAN} " == " yes" ]] ; then
170135 header " Cleaning"
171- wrapped_make clean
136+ bazel clean
172137 if [[ " ${DO_XCODE_IOS_TESTS} " == " yes" ]] ; then
173138 XCODEBUILD_CLEAN_BASE_IOS=(
174139 xcodebuild
212177
213178if [[ " ${REGEN_DESCRIPTORS} " == " yes" ]] ; then
214179 header " Regenerating the descriptor sources."
215- ./generate_descriptor_proto.sh -j " ${NUM_MAKE_JOBS } "
180+ ./generate_descriptor_proto.sh -j " ${NUM_JOBS } "
216181fi
217182
218183if [[ " ${CORE_ONLY} " == " yes" ]] ; then
219184 header " Building core Only"
220- wrapped_make -j " ${NUM_MAKE_JOBS } "
185+ bazel build //:protoc //:protobuf //:protobuf_lite -j " ${NUM_JOBS } "
221186else
222187 header " Building"
223188 # Can't issue these together, when fully parallel, something sometimes chokes
224189 # at random.
225- wrapped_make -j " ${NUM_MAKE_JOBS} " all
226- wrapped_make -j " ${NUM_MAKE_JOBS} " check
190+ bazel test //src/...
227191 # Fire off the conformance tests also.
228192 bazel test //conformance:objc
229193fi
230194
231195# Ensure the WKT sources checked in are current.
232- objectivec/generate_well_known_types.sh --check-only -j " ${NUM_MAKE_JOBS } "
196+ objectivec/generate_well_known_types.sh --check-only -j " ${NUM_JOBS } "
233197
234198header " Checking on the ObjC Runtime Code"
235199# Some of the kokoro machines don't have python3 yet, so fall back to python if need be.
@@ -293,7 +257,7 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
293257 -disable-concurrent-destination-testing
294258 )
295259 ;;
296- 11.* | 12.* | 13.* )
260+ 11.* | 12.* | 13.* | 14. * )
297261 # Dropped 32bit as Apple doesn't seem support the simulators either.
298262 XCODEBUILD_TEST_BASE_IOS+=(
299263 -destination " platform=iOS Simulator,name=iPhone 8,OS=latest" # 64bit
0 commit comments