Makefile 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. #
  2. # Key targets in this makefile:
  3. #
  4. # make build
  5. # Build the runtime library and plugin
  6. # make test
  7. # Build everything, run both plugin and library tests:
  8. # Plugin test verifies that plugin output matches the "Reference" files
  9. # exactly
  10. # Library test exercises most features of the generated code
  11. # make regenerate
  12. # Recompile all the necessary protos
  13. # (requires protoc in path)
  14. # make test-xcode[-NAME]:
  15. # Runs the tests in the Xcode project in the requested mode(s).
  16. #
  17. # Caution: 'test' does not 'regenerate', so if you've made changes to the code
  18. # generation, you'll need to do more than just 'test':
  19. # 1. 'make build' to build the plugin
  20. # 2. 'make regenerate' to rebuild the Swift code from protos using the new
  21. # plugin
  22. # 3. 'make build' again to recompile everything with the regenerated protos
  23. # 4. 'make test' to run the test suites
  24. #
  25. # How to run a 'swift' executable that supports the 'swift update', 'swift build',
  26. # 'swift test', etc commands.
  27. SWIFT=swift
  28. # How to run a working version of protoc. Invoke make with PROTOC=[path] to
  29. # override this value, i.e. -
  30. # make [TARGET] PROTOC=../protobuf/src/protoc
  31. PROTOC=protoc
  32. # How to run awk on your system
  33. AWK=awk
  34. # Installation directory
  35. BINDIR=/usr/local/bin
  36. # Install tool name
  37. INSTALL=install
  38. # Where to find a google/protobuf checkout. Defaults be being beside this
  39. # checkout. Invoke make with GOOGLE_PROTOBUF_CHECKOUT=[PATH_TO_CHECKOUT] to
  40. # override this value, i.e. -
  41. # make [TARGET] GOOGLE_PROTOBUF_CHECKOUT=[PATH_TO_CHECKOUT]
  42. GOOGLE_PROTOBUF_CHECKOUT=../protobuf
  43. # Helpers for the common parts of source generation.
  44. #
  45. # To ensure that the local version of the plugin is always used (and not a
  46. # previously installed one), we use a custom output name (-tfiws_out).
  47. PROTOC_GEN_SWIFT=.build/debug/protoc-gen-swift
  48. GENERATE_SRCS_BASE=${PROTOC} --plugin=protoc-gen-tfiws=${PROTOC_GEN_SWIFT}
  49. GENERATE_SRCS=${GENERATE_SRCS_BASE} -I Protos
  50. # Where to find the Swift conformance test runner executable.
  51. SWIFT_CONFORMANCE_PLUGIN=.build/debug/Conformance
  52. # If you have already build conformance-test-runner in
  53. # a nearby directory, just set the full path here and
  54. # we'll use it instead.
  55. CONFORMANCE_HOST=${GOOGLE_PROTOBUF_CHECKOUT}/conformance/conformance-test-runner
  56. # NOTE: TEST_PROTOS, LIBRARY_PROTOS, and PLUGIN_PROTOS are all full paths so
  57. # eventually we might be able to do proper dependencies and use them as inputs
  58. # for other rules (we'll also likely need outputs).
  59. #
  60. # But since plugin is also Swift code using the runtime, there's a bit of
  61. # recursion that doesn't lend itself to easily being resolved; as the build
  62. # could create a new plugin that in turn could cause new sources need to
  63. # generated, which in turns means the plugin needs to be rebuilt...
  64. #
  65. # It might be easier in the long run to give up on make, and instead have a
  66. # script that does the build and then generation and checks to see if generated
  67. # source change, and if it doesn't errors out to have the developer restart
  68. # the process so they stabilize.
  69. # Protos used for the unit and functional tests
  70. TEST_PROTOS= \
  71. Protos/conformance/conformance.proto \
  72. Protos/google/protobuf/any_test.proto \
  73. Protos/google/protobuf/descriptor.proto \
  74. Protos/google/protobuf/map_unittest.proto \
  75. Protos/google/protobuf/map_unittest_proto3.proto \
  76. Protos/google/protobuf/test_messages_proto3.proto \
  77. Protos/google/protobuf/unittest.proto \
  78. Protos/google/protobuf/unittest_arena.proto \
  79. Protos/google/protobuf/unittest_custom_options.proto \
  80. Protos/google/protobuf/unittest_drop_unknown_fields.proto \
  81. Protos/google/protobuf/unittest_embed_optimize_for.proto \
  82. Protos/google/protobuf/unittest_empty.proto \
  83. Protos/google/protobuf/unittest_import.proto \
  84. Protos/google/protobuf/unittest_import_lite.proto \
  85. Protos/google/protobuf/unittest_import_proto3.proto \
  86. Protos/google/protobuf/unittest_import_public.proto \
  87. Protos/google/protobuf/unittest_import_public_lite.proto \
  88. Protos/google/protobuf/unittest_import_public_proto3.proto \
  89. Protos/google/protobuf/unittest_lite.proto \
  90. Protos/google/protobuf/unittest_lite_imports_nonlite.proto \
  91. Protos/google/protobuf/unittest_mset.proto \
  92. Protos/google/protobuf/unittest_mset_wire_format.proto \
  93. Protos/google/protobuf/unittest_no_arena.proto \
  94. Protos/google/protobuf/unittest_no_arena_import.proto \
  95. Protos/google/protobuf/unittest_no_arena_lite.proto \
  96. Protos/google/protobuf/unittest_no_field_presence.proto \
  97. Protos/google/protobuf/unittest_no_generic_services.proto \
  98. Protos/google/protobuf/unittest_optimize_for.proto \
  99. Protos/google/protobuf/unittest_preserve_unknown_enum.proto \
  100. Protos/google/protobuf/unittest_preserve_unknown_enum2.proto \
  101. Protos/google/protobuf/unittest_proto3.proto \
  102. Protos/google/protobuf/unittest_proto3_arena.proto \
  103. Protos/google/protobuf/unittest_well_known_types.proto \
  104. Protos/unittest_swift_all_required_types.proto \
  105. Protos/unittest_swift_cycle.proto \
  106. Protos/unittest_swift_enum.proto \
  107. Protos/unittest_swift_enum_optional_default.proto \
  108. Protos/unittest_swift_extension.proto \
  109. Protos/unittest_swift_extension2.proto \
  110. Protos/unittest_swift_extension3.proto \
  111. Protos/unittest_swift_extension4.proto \
  112. Protos/unittest_swift_fieldorder.proto \
  113. Protos/unittest_swift_groups.proto \
  114. Protos/unittest_swift_naming.proto \
  115. Protos/unittest_swift_performance.proto \
  116. Protos/unittest_swift_reserved.proto \
  117. Protos/unittest_swift_runtime_proto2.proto \
  118. Protos/unittest_swift_runtime_proto3.proto \
  119. Protos/unittest_swift_startup.proto
  120. # TODO: The library and plugin Protos come directly from google sources.
  121. # There should be an easy way to copy the Google versions from a protobuf
  122. # checkout into this project.
  123. # Protos that are embedded into the SwiftProtobuf runtime library module
  124. LIBRARY_PROTOS= \
  125. Protos/google/protobuf/api.proto \
  126. Protos/google/protobuf/duration.proto \
  127. Protos/google/protobuf/empty.proto \
  128. Protos/google/protobuf/field_mask.proto \
  129. Protos/google/protobuf/source_context.proto \
  130. Protos/google/protobuf/timestamp.proto \
  131. Protos/google/protobuf/type.proto \
  132. Protos/google/protobuf/wrappers.proto
  133. # Protos that are used internally by the plugin
  134. PLUGIN_PROTOS= \
  135. Protos/google/protobuf/compiler/plugin.proto \
  136. Protos/google/protobuf/descriptor.proto
  137. # Protos that are used by the conformance test runner.
  138. CONFORMANCE_PROTOS= \
  139. Protos/conformance/conformance.proto \
  140. Protos/google/protobuf/test_messages_proto3.proto
  141. XCODEBUILD_EXTRAS =
  142. # Invoke make with XCODE_SKIP_OPTIMIZER=1 to suppress the optimizer when
  143. # building the Xcode projects. For Release builds, this is a non trivial speed
  144. # up for compilation
  145. XCODE_SKIP_OPTIMIZER=0
  146. ifeq "$(XCODE_SKIP_OPTIMIZER)" "1"
  147. XCODEBUILD_EXTRAS += SWIFT_OPTIMIZATION_LEVEL=-Onone
  148. endif
  149. # Invoke make with XCODE_ANALYZE=1 to enable the analyzer while building the
  150. # Xcode projects.
  151. XCODE_ANALYZE=0
  152. ifeq "$(XCODE_ANALYZE)" "1"
  153. XCODEBUILD_EXTRAS += RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=deep
  154. endif
  155. .PHONY: \
  156. all \
  157. build \
  158. check \
  159. check-for-protobuf-checkout \
  160. clean \
  161. conformance-host \
  162. default \
  163. docs \
  164. install \
  165. reference \
  166. regenerate \
  167. regenerate-conformance-protos \
  168. regenerate-library-protos \
  169. regenerate-plugin-protos \
  170. regenerate-test-protos \
  171. test \
  172. test-all \
  173. test-everything \
  174. test-plugin \
  175. test-runtime \
  176. test-xcode \
  177. test-xcode-debug \
  178. test-xcode-release \
  179. test-xcode-iOS \
  180. test-xcode-iOS-debug \
  181. test-xcode-iOS-release \
  182. test-xcode-macOS \
  183. test-xcode-macOS-debug \
  184. test-xcode-macOS-release \
  185. test-xcode-tvOS \
  186. test-xcode-tvOS-debug \
  187. test-xcode-tvOS-release \
  188. test-xcode-watchOS \
  189. test-xcode-watchOS-debug \
  190. test-xcode-watchOS-release \
  191. update-proto-files
  192. .NOTPARALLEL: \
  193. test-xcode-iOS-debug \
  194. test-xcode-iOS-release \
  195. test-xcode-macOS-debug \
  196. test-xcode-macOS-release \
  197. test-xcode-tvOS-debug \
  198. test-xcode-tvOS-release \
  199. test-xcode-watchOS-debug \
  200. test-xcode-watchOS-release
  201. default: build
  202. all: build
  203. # This also rebuilds LinuxMain.swift to include all of the test cases.
  204. # (The awk script is very fast, so re-running it on every build is reasonable,
  205. # but we only update the file when it changes to avoid extra builds.)
  206. # (Someday, 'swift test' will learn how to auto-discover test cases on Linux,
  207. # at which time this will no longer be needed.)
  208. build:
  209. @${AWK} -f CollectTests.awk Tests/SwiftProtobufTests/Test_*.swift > Tests/LinuxMain.swift.new
  210. @if ! cmp -s Tests/LinuxMain.swift.new Tests/LinuxMain.swift; then \
  211. cp Tests/LinuxMain.swift.new Tests/LinuxMain.swift; \
  212. echo "FYI: Tests/LinuxMain.swift Updated"; \
  213. fi
  214. @rm Tests/LinuxMain.swift.new
  215. ${SWIFT} build
  216. # This will get run by any other rule that tries to use the plugin. This hacks
  217. # in a check during the library build to ensure that the protoc on the local
  218. # system is one we expect. This was inspired by the findings that lead to
  219. # https://github.com/apple/swift-protobuf/issues/111
  220. # We want 3.1 or later.
  221. ${PROTOC_GEN_SWIFT}: build
  222. @if [[ ! "$(shell ${PROTOC} --version)" =~ libprotoc\ 3\.[1-9]\.[[:digit:]]+ ]]; then \
  223. echo "===================================================================================="; \
  224. echo "WARNING: Unexpected version of protoc: $(shell ${PROTOC} --version)"; \
  225. echo "WARNING: The JSON support in generated files may not be correct."; \
  226. echo "WARNING: Use a protoc that is 3.1.x or higher."; \
  227. echo "===================================================================================="; \
  228. fi
  229. # Does it really make sense to install a debug build, or should this be forcing
  230. # a release build and then installing that instead?
  231. install: build
  232. ${INSTALL} ${PROTOC_GEN_SWIFT} ${BINDIR}
  233. clean:
  234. swift build --clean
  235. rm -rf .build _test ${PROTOC_GEN_SWIFT}
  236. find . -name '*~' | xargs rm
  237. # Build a local copy of the API documentation, using the same process used
  238. # by cocoadocs.org.
  239. docs:
  240. @if which jazzy >/dev/null; then \
  241. jazzy; \
  242. else \
  243. echo "Jazzy not installed, use 'gem install jazzy' or download from https://github.com/realm/jazzy"; \
  244. fi
  245. #
  246. # Test the runtime and the plugin
  247. #
  248. # This must pass before any commit.
  249. #
  250. check test: build test-runtime test-plugin
  251. # Test everything (runtime, plugin, xcode project)
  252. test-all test-everything: test test-xcode
  253. #
  254. # The Swift test suite includes unit tests for the runtime library
  255. # and functional tests for the Swift code generated by the plugin.
  256. #
  257. test-runtime: build
  258. ${SWIFT} test
  259. #
  260. # Test the plugin by itself:
  261. # * Translate every proto in Protos into Swift using local protoc-gen-swift
  262. # * Put result in _test directory
  263. # * Compare output with reference output in Reference directory
  264. # * If generated output and reference output don't match exactly, fail.
  265. #
  266. # Of course, this will fail if you've made any changes to the generated output.
  267. # In that case, you'll need to do the following before committing:
  268. # * `make regenerate` to rebuild the protos used by the runtime and plugin
  269. # * `make test-runtime` to verify that the runtime works correctly with the new changes
  270. # * `make reference` to update the Reference directory
  271. # * MANUALLY go through `git diff Reference` to verify that the generated Swift changed in the way you expect
  272. # * `make clean build test` to do a final check
  273. #
  274. # Note: Some of these protos define the same package.(message|enum)s, so they
  275. # can't be done in a single protoc/proto-gen-swift invoke and have to be done
  276. # one at a time instead.
  277. test-plugin: build ${PROTOC_GEN_SWIFT}
  278. @rm -rf _test && mkdir _test
  279. for p in `find Protos -type f -name '*.proto'`; do \
  280. ${GENERATE_SRCS} --tfiws_out=_test $$p; \
  281. done
  282. diff -ru _test Reference
  283. #
  284. # Rebuild the reference files by running the local version of protoc-gen-swift
  285. # against our menagerie of sample protos.
  286. #
  287. # If you do this, you MUST MANUALLY verify these files before checking them in,
  288. # since the new checkin will become the new master reference.
  289. #
  290. # Note: Some of these protos define the same package.(message|enum)s, so they
  291. # can't be done in a single protoc/proto-gen-swift invoke and have to be done
  292. # one at a time instead.
  293. reference: build ${PROTOC_GEN_SWIFT}
  294. @rm -rf Reference && mkdir Reference
  295. for p in `find Protos -type f -name '*.proto'`; do \
  296. ${GENERATE_SRCS} --tfiws_out=Reference $$p; \
  297. done
  298. #
  299. # Rebuild the generated .pb.swift test files by running
  300. # protoc over all the relevant inputs.
  301. #
  302. # Before running this, ensure that:
  303. # * protoc-gen-swift is built and installed somewhere in your system PATH
  304. # * protoc is built and installed
  305. # * PROTOC at the top of this file is set correctly
  306. #
  307. regenerate: regenerate-library-protos regenerate-plugin-protos regenerate-test-protos regenerate-conformance-protos
  308. # Rebuild just the protos included in the runtime library
  309. regenerate-library-protos: build ${PROTOC_GEN_SWIFT}
  310. ${GENERATE_SRCS} \
  311. --tfiws_opt=FileNaming=DropPath \
  312. --tfiws_opt=Visibility=Public \
  313. --tfiws_out=Sources/SwiftProtobuf \
  314. ${LIBRARY_PROTOS}
  315. # Rebuild just the protos used by the plugin
  316. regenerate-plugin-protos: build ${PROTOC_GEN_SWIFT}
  317. ${GENERATE_SRCS} \
  318. --tfiws_opt=FileNaming=DropPath \
  319. --tfiws_opt=Visibility=Public \
  320. --tfiws_out=Sources/PluginLibrary \
  321. ${PLUGIN_PROTOS}
  322. # Rebuild just the protos used by the runtime test suite
  323. # Note: Some of these protos define the same package.(message|enum)s, so they
  324. # can't be done in a single protoc/proto-gen-swift invoke and have to be done
  325. # one at a time instead.
  326. regenerate-test-protos: build ${PROTOC_GEN_SWIFT}
  327. for t in ${TEST_PROTOS}; do \
  328. ${GENERATE_SRCS} \
  329. --tfiws_opt=FileNaming=DropPath \
  330. --tfiws_out=Tests/SwiftProtobufTests \
  331. $$t; \
  332. done
  333. # Rebuild just the protos used by the conformance test runner.
  334. regenerate-conformance-protos: build ${PROTOC_GEN_SWIFT}
  335. ${GENERATE_SRCS} \
  336. --tfiws_opt=FileNaming=DropPath \
  337. --tfiws_out=Sources/Conformance \
  338. ${CONFORMANCE_PROTOS}
  339. # Helper to check if there is a protobuf checkout as expected.
  340. check-for-protobuf-checkout:
  341. @if [ ! -d "${GOOGLE_PROTOBUF_CHECKOUT}/src/google/protobuf" ]; then \
  342. echo "ERROR: ${GOOGLE_PROTOBUF_CHECKOUT} does not appear to be a checkout of"; \
  343. echo "ERROR: github.com/google/protobuf. Please check it out or set"; \
  344. echo "ERROR: GOOGLE_PROTOBUF_CHECKOUT to point to a checkout."; \
  345. exit 1; \
  346. fi
  347. #
  348. # Helper to update the .proto files copied from the google/protobuf distro.
  349. #
  350. update-proto-files: check-for-protobuf-checkout
  351. @rm -rf Protos/conformance && mkdir Protos/conformance
  352. @cp -v "${GOOGLE_PROTOBUF_CHECKOUT}"/conformance/*.proto Protos/conformance/
  353. @rm -rf Protos/google && mkdir -p Protos/google/protobuf/compiler
  354. @cp -v "${GOOGLE_PROTOBUF_CHECKOUT}"/src/google/protobuf/*.proto Protos/google/protobuf/
  355. @cp -v "${GOOGLE_PROTOBUF_CHECKOUT}"/src/google/protobuf/compiler/*.proto Protos/google/protobuf/compiler/
  356. # It would be nice to get these added to google/protobuf instead of
  357. # applying them locally.
  358. @echo 'option swift_prefix = "Proto3";' >> Protos/google/protobuf/map_unittest_proto3.proto
  359. @echo 'option swift_prefix = "Proto3";' >> Protos/google/protobuf/unittest_import_proto3.proto
  360. @echo 'option swift_prefix = "Proto3";' >> Protos/google/protobuf/unittest_import_public_proto3.proto
  361. @echo 'option swift_prefix = "Proto3";' >> Protos/google/protobuf/unittest_proto3.proto
  362. SWIFT_CONFORMANCE_PLUGIN_SOURCES= \
  363. Sources/Conformance/conformance.pb.swift \
  364. Sources/Conformance/main.swift
  365. $(SWIFT_CONFORMANCE_PLUGIN): $(SWIFT_CONFORMANCE_PLUGIN_SOURCES)
  366. ${SWIFT} build
  367. # Runs the conformance tests.
  368. test-conformance: check-for-protobuf-checkout $(SWIFT_CONFORMANCE_PLUGIN) $(CONFORMANCE_HOST) failure_list_swift.txt
  369. ( \
  370. ABS_PBDIR=`cd ${GOOGLE_PROTOBUF_CHECKOUT}; pwd`; \
  371. $${ABS_PBDIR}/conformance/conformance-test-runner --failure_list failure_list_swift.txt $(SWIFT_CONFORMANCE_PLUGIN); \
  372. )
  373. # The 'conformance-host' program is part of the protobuf project.
  374. # It generates test cases, feeds them to our plugin, and verifies the results:
  375. conformance-host $(CONFORMANCE_HOST): check-for-protobuf-checkout
  376. @if [ ! -f "${GOOGLE_PROTOBUF_CHECKOUT}/Makefile" ]; then \
  377. echo "No Makefile, running autogen.sh and configure." ; \
  378. ( cd ${GOOGLE_PROTOBUF_CHECKOUT} && \
  379. ./autogen.sh && \
  380. ./configure ) \
  381. fi
  382. $(MAKE) -C ${GOOGLE_PROTOBUF_CHECKOUT}/src
  383. $(MAKE) -C ${GOOGLE_PROTOBUF_CHECKOUT}/conformance
  384. # Helpers to put the Xcode project through all modes.
  385. # Grouping targets
  386. test-xcode: test-xcode-iOS test-xcode-macOS test-xcode-tvOS test-xcode-watchOS
  387. test-xcode-iOS: test-xcode-iOS-debug test-xcode-iOS-release
  388. test-xcode-macOS: test-xcode-macOS-debug test-xcode-macOS-release
  389. test-xcode-tvOS: test-xcode-tvOS-debug test-xcode-tvOS-release
  390. test-xcode-watchOS: test-xcode-watchOS-debug test-xcode-watchOS-release
  391. test-xcode-debug: test-xcode-iOS-debug test-xcode-macOS-debug test-xcode-tvOS-debug test-xcode-watchOS-debug
  392. test-xcode-release: test-xcode-iOS-release test-xcode-macOS-release test-xcode-tvOS-release test-xcode-watchOS-release
  393. # The individual ones
  394. # 4s - 32bit, 6s - 64bit
  395. test-xcode-iOS-debug:
  396. xcodebuild -project SwiftProtobuf.xcodeproj \
  397. -scheme SwiftProtobuf_iOS \
  398. -configuration Debug \
  399. -destination "platform=iOS Simulator,name=iPhone 6s,OS=latest" \
  400. -destination "platform=iOS Simulator,name=iPhone 4s,OS=9.0" \
  401. test $(XCODEBUILD_EXTRAS)
  402. # 4s - 32bit, 6s - 64bit
  403. test-xcode-iOS-release:
  404. xcodebuild -project SwiftProtobuf.xcodeproj \
  405. -scheme SwiftProtobuf_iOS \
  406. -configuration Release \
  407. -destination "platform=iOS Simulator,name=iPhone 6s,OS=latest" \
  408. -destination "platform=iOS Simulator,name=iPhone 4s,OS=9.0" \
  409. test $(XCODEBUILD_EXTRAS)
  410. test-xcode-macOS-debug:
  411. xcodebuild -project SwiftProtobuf.xcodeproj \
  412. -scheme SwiftProtobuf_macOS \
  413. -configuration debug \
  414. build test $(XCODEBUILD_EXTRAS)
  415. test-xcode-macOS-release:
  416. xcodebuild -project SwiftProtobuf.xcodeproj \
  417. -scheme SwiftProtobuf_macOS \
  418. -configuration Release \
  419. build test $(XCODEBUILD_EXTRAS)
  420. test-xcode-tvOS-debug:
  421. xcodebuild -project SwiftProtobuf.xcodeproj \
  422. -scheme SwiftProtobuf_tvOS \
  423. -configuration Debug \
  424. -destination "platform=tvOS Simulator,name=Apple TV 1080p,OS=latest" \
  425. build test $(XCODEBUILD_EXTRAS)
  426. test-xcode-tvOS-release:
  427. xcodebuild -project SwiftProtobuf.xcodeproj \
  428. -scheme SwiftProtobuf_tvOS \
  429. -configuration Release \
  430. -destination "platform=tvOS Simulator,name=Apple TV 1080p,OS=latest" \
  431. build test $(XCODEBUILD_EXTRAS)
  432. # watchOS doesn't support tests, just do a build.
  433. test-xcode-watchOS-debug:
  434. xcodebuild -project SwiftProtobuf.xcodeproj \
  435. -scheme SwiftProtobuf_watchOS \
  436. -configuration Debug \
  437. build $(XCODEBUILD_EXTRAS)
  438. # watchOS doesn't support tests, just do a build.
  439. test-xcode-watchOS-release:
  440. xcodebuild -project SwiftProtobuf.xcodeproj \
  441. -scheme SwiftProtobuf_watchOS \
  442. -configuration Release \
  443. build $(XCODEBUILD_EXTRAS)