build.sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. #!/usr/bin/env bash
  2. # Copyright 2018 Google
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # USAGE: build.sh product [platform] [method]
  16. #
  17. # Builds the given product for the given platform using the given build method
  18. function pod_gen() {
  19. # Call pod gen with a podspec and additional optional arguments.
  20. bundle exec pod gen --local-sources=./ --sources=https://github.com/firebase/SpecsDev.git,https://github.com/firebase/SpecsStaging.git,https://cdn.cocoapods.org/ "$@"
  21. }
  22. set -euo pipefail
  23. if [[ $# -lt 1 ]]; then
  24. cat 1>&2 <<EOF
  25. USAGE: $0 product [platform] [method]
  26. product can be one of:
  27. Firebase
  28. Firestore
  29. CombineSwift
  30. InAppMessaging
  31. Messaging
  32. MessagingSample
  33. MLModelDownloaderSample
  34. RemoteConfig
  35. RemoteConfigSample
  36. Storage
  37. StorageSwift
  38. SymbolCollision
  39. GoogleDataTransport
  40. Performance
  41. platform can be one of:
  42. iOS (default)
  43. iOS-device
  44. macOS
  45. tvOS
  46. watchOS
  47. catalyst
  48. method can be one of:
  49. xcodebuild (default)
  50. cmake
  51. unit
  52. integration
  53. spm
  54. Optionally, reads the environment variable SANITIZERS. If set, it is expected to
  55. be a string containing a space-separated list with some of the following
  56. elements:
  57. asan
  58. tsan
  59. ubsan
  60. EOF
  61. exit 1
  62. fi
  63. product="$1"
  64. platform="iOS"
  65. if [[ $# -gt 1 ]]; then
  66. platform="$2"
  67. fi
  68. method="xcodebuild"
  69. if [[ $# -gt 2 ]]; then
  70. method="$3"
  71. fi
  72. echo "Building $product for $platform using $method"
  73. if [[ -n "${SANITIZERS:-}" ]]; then
  74. echo "Using sanitizers: $SANITIZERS"
  75. fi
  76. scripts_dir=$(dirname "${BASH_SOURCE[0]}")
  77. firestore_emulator="${scripts_dir}/run_firestore_emulator.sh"
  78. database_emulator="${scripts_dir}/run_database_emulator.sh"
  79. system=$(uname -s)
  80. case "$system" in
  81. Darwin)
  82. xcode_version=$(xcodebuild -version | head -n 1)
  83. xcode_version="${xcode_version/Xcode /}"
  84. xcode_major="${xcode_version/.*/}"
  85. ;;
  86. *)
  87. xcode_major="0"
  88. ;;
  89. esac
  90. # Source function to check if CI secrets are available.
  91. source scripts/check_secrets.sh
  92. # Runs xcodebuild with the given flags, piping output to xcpretty
  93. # If xcodebuild fails with known error codes, retries once.
  94. function RunXcodebuild() {
  95. echo xcodebuild "$@"
  96. xcpretty_cmd=(xcpretty)
  97. if [[ -n "${TRAVIS:-}" ]]; then
  98. # The formatter argument takes a file location of a formatter.
  99. # The xcpretty-travis-formatter binary prints its location on stdout.
  100. xcpretty_cmd+=(-f $(xcpretty-travis-formatter))
  101. fi
  102. result=0
  103. xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$?
  104. if [[ $result == 65 ]]; then
  105. ExportLogs "$@"
  106. echo "xcodebuild exited with 65, retrying" 1>&2
  107. sleep 5
  108. result=0
  109. xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$?
  110. fi
  111. if [[ $result != 0 ]]; then
  112. echo "xcodebuild exited with $result" 1>&2
  113. ExportLogs "$@"
  114. return $result
  115. fi
  116. }
  117. # Exports any logs output captured in the xcresult
  118. function ExportLogs() {
  119. python "${scripts_dir}/xcresult_logs.py" "$@"
  120. }
  121. if [[ "$xcode_major" -lt 11 ]]; then
  122. ios_flags=(
  123. -sdk 'iphonesimulator'
  124. -destination 'platform=iOS Simulator,name=iPhone 7'
  125. )
  126. else
  127. ios_flags=(
  128. -sdk 'iphonesimulator'
  129. -destination 'platform=iOS Simulator,name=iPhone 11'
  130. )
  131. fi
  132. ios_device_flags=(
  133. -sdk 'iphoneos'
  134. )
  135. ipad_flags=(
  136. -sdk 'iphonesimulator'
  137. -destination 'platform=iOS Simulator,name=iPad Pro (9.7-inch)'
  138. )
  139. macos_flags=(
  140. -sdk 'macosx'
  141. -destination 'platform=OS X,arch=x86_64'
  142. )
  143. tvos_flags=(
  144. -sdk "appletvsimulator"
  145. -destination 'platform=tvOS Simulator,name=Apple TV'
  146. )
  147. watchos_flags=(
  148. -destination 'platform=iOS Simulator,name=iPhone 11 Pro'
  149. )
  150. catalyst_flags=(
  151. ARCHS=x86_64 VALID_ARCHS=x86_64 SUPPORTS_MACCATALYST=YES -sdk macosx
  152. -destination platform="macOS,variant=Mac Catalyst" TARGETED_DEVICE_FAMILY=2
  153. CODE_SIGN_IDENTITY=- CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
  154. )
  155. # Compute standard flags for all platforms
  156. case "$platform" in
  157. iOS)
  158. xcb_flags=("${ios_flags[@]}")
  159. gen_platform=ios
  160. ;;
  161. iOS-device)
  162. xcb_flags=("${ios_device_flags[@]}")
  163. gen_platform=ios
  164. ;;
  165. iPad)
  166. xcb_flags=("${ipad_flags[@]}")
  167. ;;
  168. macOS)
  169. xcb_flags=("${macos_flags[@]}")
  170. gen_platform=macos
  171. ;;
  172. tvOS)
  173. xcb_flags=("${tvos_flags[@]}")
  174. gen_platform=tvos
  175. ;;
  176. watchOS)
  177. xcb_flags=("${watchos_flags[@]}")
  178. ;;
  179. catalyst)
  180. xcb_flags=("${catalyst_flags[@]}")
  181. ;;
  182. all)
  183. xcb_flags=()
  184. ;;
  185. Linux)
  186. xcb_flags=()
  187. ;;
  188. *)
  189. echo "Unknown platform '$platform'" 1>&2
  190. exit 1
  191. ;;
  192. esac
  193. xcb_flags+=(
  194. ONLY_ACTIVE_ARCH=YES
  195. CODE_SIGNING_REQUIRED=NO
  196. CODE_SIGNING_ALLOWED=YES
  197. COMPILER_INDEX_STORE_ENABLE=NO
  198. )
  199. # TODO(varconst): Add --warn-unused-vars and --warn-uninitialized.
  200. # Right now, it makes the log overflow on Travis because many of our
  201. # dependencies don't build cleanly this way.
  202. cmake_options=(
  203. -Wdeprecated
  204. -DCMAKE_BUILD_TYPE=Debug
  205. )
  206. if [[ -n "${SANITIZERS:-}" ]]; then
  207. for sanitizer in $SANITIZERS; do
  208. case "$sanitizer" in
  209. asan)
  210. xcb_flags+=(
  211. -enableAddressSanitizer YES
  212. )
  213. cmake_options+=(
  214. -DWITH_ASAN=ON
  215. )
  216. ;;
  217. tsan)
  218. xcb_flags+=(
  219. -enableThreadSanitizer YES
  220. )
  221. cmake_options+=(
  222. -DWITH_TSAN=ON
  223. )
  224. ;;
  225. ubsan)
  226. xcb_flags+=(
  227. -enableUndefinedBehaviorSanitizer YES
  228. )
  229. cmake_options+=(
  230. -DWITH_UBSAN=ON
  231. )
  232. ;;
  233. *)
  234. echo "Unknown sanitizer '$sanitizer'" 1>&2
  235. exit 1
  236. ;;
  237. esac
  238. done
  239. fi
  240. case "$product-$platform-$method" in
  241. FirebasePod-iOS-*)
  242. RunXcodebuild \
  243. -workspace 'CoreOnly/Tests/FirebasePodTest/FirebasePodTest.xcworkspace' \
  244. -scheme "FirebasePodTest" \
  245. "${xcb_flags[@]}" \
  246. build
  247. ;;
  248. Auth-*-xcodebuild)
  249. if check_secrets; then
  250. RunXcodebuild \
  251. -workspace 'FirebaseAuth/Tests/Sample/AuthSample.xcworkspace' \
  252. -scheme "Auth_ApiTests" \
  253. "${xcb_flags[@]}" \
  254. build \
  255. test
  256. RunXcodebuild \
  257. -workspace 'FirebaseAuth/Tests/Sample/AuthSample.xcworkspace' \
  258. -scheme "SwiftApiTests" \
  259. "${xcb_flags[@]}" \
  260. build \
  261. test
  262. fi
  263. ;;
  264. CombineSwift-*-xcodebuild)
  265. pod_gen FirebaseCombineSwift.podspec --platforms=ios
  266. RunXcodebuild \
  267. -workspace 'gen/FirebaseCombineSwift/FirebaseCombineSwift.xcworkspace' \
  268. -scheme "FirebaseCombineSwift-Unit-unit" \
  269. "${xcb_flags[@]}" \
  270. build \
  271. test
  272. ;;
  273. InAppMessaging-*-xcodebuild)
  274. RunXcodebuild \
  275. -workspace 'FirebaseInAppMessaging/Tests/Integration/DefaultUITestApp/InAppMessagingDisplay-Sample.xcworkspace' \
  276. -scheme 'FiamDisplaySwiftExample' \
  277. "${xcb_flags[@]}" \
  278. build \
  279. test
  280. ;;
  281. Firestore-*-xcodebuild)
  282. "${firestore_emulator}" start
  283. trap '"${firestore_emulator}" stop' ERR EXIT
  284. RunXcodebuild \
  285. -workspace 'Firestore/Example/Firestore.xcworkspace' \
  286. -scheme "Firestore_IntegrationTests_$platform" \
  287. -enableCodeCoverage YES \
  288. "${xcb_flags[@]}" \
  289. build \
  290. test
  291. ;;
  292. Firestore-macOS-cmake | Firestore-Linux-cmake)
  293. "${firestore_emulator}" start
  294. trap '"${firestore_emulator}" stop' ERR EXIT
  295. (
  296. test -d build || mkdir build
  297. cd build
  298. echo "Preparing cmake build ..."
  299. cmake -G Ninja "${cmake_options[@]}" ..
  300. echo "Building cmake build ..."
  301. ninja -k 10 all
  302. ctest --output-on-failure
  303. )
  304. ;;
  305. SymbolCollision-*-*)
  306. RunXcodebuild \
  307. -workspace 'SymbolCollisionTest/SymbolCollisionTest.xcworkspace' \
  308. -scheme "SymbolCollisionTest" \
  309. "${xcb_flags[@]}" \
  310. build
  311. ;;
  312. Messaging-*-xcodebuild)
  313. pod_gen FirebaseMessaging.podspec --platforms=ios
  314. RunXcodebuild \
  315. -workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
  316. -scheme "FirebaseMessaging-Unit-unit" \
  317. "${ios_flags[@]}" \
  318. "${xcb_flags[@]}" \
  319. build \
  320. test
  321. if check_secrets; then
  322. # Integration tests are only run on iOS to minimize flake failures.
  323. RunXcodebuild \
  324. -workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
  325. -scheme "FirebaseMessaging-Unit-integration" \
  326. "${ios_flags[@]}" \
  327. "${xcb_flags[@]}" \
  328. build \
  329. test
  330. fi
  331. pod_gen FirebaseMessaging.podspec --platforms=macos --clean
  332. RunXcodebuild \
  333. -workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
  334. -scheme "FirebaseMessaging-Unit-unit" \
  335. "${macos_flags[@]}" \
  336. "${xcb_flags[@]}" \
  337. build \
  338. test
  339. pod_gen FirebaseMessaging.podspec --platforms=tvos --clean
  340. RunXcodebuild \
  341. -workspace 'gen/FirebaseMessaging/FirebaseMessaging.xcworkspace' \
  342. -scheme "FirebaseMessaging-Unit-unit" \
  343. "${tvos_flags[@]}" \
  344. "${xcb_flags[@]}" \
  345. build \
  346. test
  347. ;;
  348. MessagingSample-*-*)
  349. if check_secrets; then
  350. RunXcodebuild \
  351. -workspace 'FirebaseMessaging/Apps/Sample/Sample.xcworkspace' \
  352. -scheme "Sample" \
  353. "${xcb_flags[@]}" \
  354. build
  355. fi
  356. ;;
  357. MLModelDownloaderSample-*-*)
  358. if check_secrets; then
  359. RunXcodebuild \
  360. -workspace 'FirebaseMLModelDownloader/Apps/Sample/MLDownloaderTestApp.xcworkspace' \
  361. -scheme "MLDownloaderTestApp" \
  362. "${xcb_flags[@]}" \
  363. build
  364. fi
  365. ;;
  366. SegmentationSample-*-*)
  367. RunXcodebuild \
  368. -workspace 'FirebaseSegmentation/Tests/Sample/SegmentationSampleApp.xcworkspace' \
  369. -scheme "SegmentationSampleApp" \
  370. "${xcb_flags[@]}" \
  371. build
  372. ;;
  373. WatchOSSample-*-*)
  374. RunXcodebuild \
  375. -workspace 'Example/watchOSSample/SampleWatchApp.xcworkspace' \
  376. -scheme "SampleWatchAppWatchKitApp" \
  377. "${xcb_flags[@]}" \
  378. build
  379. ;;
  380. Database-*-unit)
  381. pod_gen FirebaseDatabase.podspec --platforms="${gen_platform}"
  382. RunXcodebuild \
  383. -workspace 'gen/FirebaseDatabase/FirebaseDatabase.xcworkspace' \
  384. -scheme "FirebaseDatabase-Unit-unit" \
  385. "${xcb_flags[@]}" \
  386. build \
  387. test
  388. ;;
  389. Database-*-integration)
  390. "${database_emulator}" start
  391. trap '"${database_emulator}" stop' ERR EXIT
  392. pod_gen FirebaseDatabase.podspec --platforms="${gen_platform}"
  393. RunXcodebuild \
  394. -workspace 'gen/FirebaseDatabase/FirebaseDatabase.xcworkspace' \
  395. -scheme "FirebaseDatabase-Unit-integration" \
  396. "${xcb_flags[@]}" \
  397. build \
  398. test
  399. ;;
  400. RemoteConfig-*-unit)
  401. pod_gen FirebaseRemoteConfig.podspec --platforms="${gen_platform}"
  402. RunXcodebuild \
  403. -workspace 'gen/FirebaseRemoteConfig/FirebaseRemoteConfig.xcworkspace' \
  404. -scheme "FirebaseRemoteConfig-Unit-unit" \
  405. "${xcb_flags[@]}" \
  406. build \
  407. test
  408. ;;
  409. RemoteConfig-*-fakeconsole)
  410. pod_gen FirebaseRemoteConfig.podspec --platforms="${gen_platform}"
  411. RunXcodebuild \
  412. -workspace 'gen/FirebaseRemoteConfig/FirebaseRemoteConfig.xcworkspace' \
  413. -scheme "FirebaseRemoteConfig-Unit-fake-console-tests" \
  414. "${xcb_flags[@]}" \
  415. build \
  416. test
  417. ;;
  418. RemoteConfig-*-integration)
  419. pod_gen FirebaseRemoteConfig.podspec --platforms="${gen_platform}"
  420. RunXcodebuild \
  421. -workspace 'gen/FirebaseRemoteConfig/FirebaseRemoteConfig.xcworkspace' \
  422. -scheme "FirebaseRemoteConfig-Unit-swift-api-tests" \
  423. "${xcb_flags[@]}" \
  424. build \
  425. test
  426. ;;
  427. RemoteConfigSample-*-*)
  428. RunXcodebuild \
  429. -workspace 'FirebaseRemoteConfig/Tests/Sample/RemoteConfigSampleApp.xcworkspace' \
  430. -scheme "RemoteConfigSampleApp" \
  431. "${xcb_flags[@]}" \
  432. build
  433. ;;
  434. Storage-*-xcodebuild)
  435. pod_gen FirebaseStorage.podspec --platforms=ios
  436. # Add GoogleService-Info.plist to generated Test Wrapper App.
  437. ruby ./scripts/update_xcode_target.rb gen/FirebaseStorage/Pods/Pods.xcodeproj \
  438. AppHost-FirebaseStorage-Unit-Tests \
  439. ../../../FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
  440. if check_secrets; then
  441. # Integration tests are only run on iOS to minimize flake failures.
  442. RunXcodebuild \
  443. -workspace 'gen/FirebaseStorage/FirebaseStorage.xcworkspace' \
  444. -scheme "FirebaseStorage-Unit-integration" \
  445. "${ios_flags[@]}" \
  446. "${xcb_flags[@]}" \
  447. build \
  448. test
  449. RunXcodebuild \
  450. -workspace 'gen/FirebaseStorage/FirebaseStorage.xcworkspace' \
  451. -scheme "FirebaseStorage-Unit-swift-integration" \
  452. "${ios_flags[@]}" \
  453. "${xcb_flags[@]}" \
  454. build \
  455. test
  456. fi
  457. ;;
  458. StorageSwift-*-xcodebuild)
  459. pod_gen FirebaseStorageSwift.podspec --platforms=ios
  460. # Add GoogleService-Info.plist to generated Test Wrapper App.
  461. ruby ./scripts/update_xcode_target.rb gen/FirebaseStorageSwift/Pods/Pods.xcodeproj \
  462. AppHost-FirebaseStorageSwift-Unit-Tests \
  463. ../../../FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
  464. if check_secrets; then
  465. # Integration tests are only run on iOS to minimize flake failures.
  466. RunXcodebuild \
  467. -workspace 'gen/FirebaseStorageSwift/FirebaseStorageSwift.xcworkspace' \
  468. -scheme "FirebaseStorageSwift-Unit-integration" \
  469. "${ios_flags[@]}" \
  470. "${xcb_flags[@]}" \
  471. build \
  472. test
  473. fi
  474. ;;
  475. StorageCombine-*-xcodebuild)
  476. pod_gen FirebaseCombineSwift.podspec --platforms=ios
  477. # Add GoogleService-Info.plist to generated Test Wrapper App.
  478. ruby ./scripts/update_xcode_target.rb gen/FirebaseCombineSwift/Pods/Pods.xcodeproj \
  479. AppHost-FirebaseCombineSwift-Unit-Tests \
  480. ../../../FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
  481. if check_secrets; then
  482. # Integration tests are only run on iOS to minimize flake failures.
  483. RunXcodebuild \
  484. -workspace 'gen/FirebaseCombineSwift/FirebaseCombineSwift.xcworkspace' \
  485. -scheme "FirebaseCombineSwift-Unit-integration" \
  486. "${ios_flags[@]}" \
  487. "${xcb_flags[@]}" \
  488. build \
  489. test
  490. fi
  491. ;;
  492. GoogleDataTransport-watchOS-xcodebuild)
  493. RunXcodebuild \
  494. -workspace 'GoogleDataTransport/GDTWatchOSTestApp/GDTWatchOSTestApp.xcworkspace' \
  495. -scheme "GDTWatchOSTestAppWatchKitApp" \
  496. "${xcb_flags[@]}" \
  497. build
  498. RunXcodebuild \
  499. -workspace 'GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSTestApp.xcworkspace' \
  500. -scheme "GDTCCTWatchOSIndependentTestAppWatchKitApp" \
  501. "${xcb_flags[@]}" \
  502. build
  503. RunXcodebuild \
  504. -workspace 'GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSTestApp.xcworkspace' \
  505. -scheme "GDTCCTWatchOSCompanionTestApp" \
  506. "${xcb_flags[@]}" \
  507. build
  508. ;;
  509. Performance-*-unit)
  510. # Run unit tests on prod environment with unswizzle capabilities.
  511. export FPR_UNSWIZZLE_AVAILABLE="1"
  512. export FPR_AUTOPUSH_ENV="0"
  513. pod_gen FirebasePerformance.podspec --platforms="${gen_platform}"
  514. RunXcodebuild \
  515. -workspace 'gen/FirebasePerformance/FirebasePerformance.xcworkspace' \
  516. -scheme "FirebasePerformance-Unit-unit" \
  517. "${xcb_flags[@]}" \
  518. build \
  519. test
  520. ;;
  521. Performance-*-proddev)
  522. # Build the prod dev test app.
  523. export FPR_UNSWIZZLE_AVAILABLE="0"
  524. export FPR_AUTOPUSH_ENV="0"
  525. pod_gen FirebasePerformance.podspec --platforms="${gen_platform}"
  526. RunXcodebuild \
  527. -workspace 'gen/FirebasePerformance/FirebasePerformance.xcworkspace' \
  528. -scheme "FirebasePerformance-TestApp" \
  529. "${xcb_flags[@]}" \
  530. build
  531. ;;
  532. Performance-*-integration)
  533. # Generate the workspace for the SDK to generate Protobuf files.
  534. export FPR_UNSWIZZLE_AVAILABLE="0"
  535. pod_gen FirebasePerformance.podspec --platforms=ios --clean
  536. # Perform "pod install" to install the relevant dependencies
  537. cd FirebasePerformance/Tests/FIRPerfE2E; pod install; cd -
  538. # Run E2E Integration Tests for Autopush.
  539. RunXcodebuild \
  540. -workspace 'FirebasePerformance/Tests/FIRPerfE2E/FIRPerfE2E.xcworkspace' \
  541. -scheme "FIRPerfE2EAutopush" \
  542. FPR_AUTOPUSH_ENV=1 \
  543. "${ios_flags[@]}" \
  544. "${xcb_flags[@]}" \
  545. build \
  546. test
  547. # Run E2E Integration Tests for Prod.
  548. RunXcodebuild \
  549. -workspace 'FirebasePerformance/Tests/FIRPerfE2E/FIRPerfE2E.xcworkspace' \
  550. -scheme "FIRPerfE2EProd" \
  551. "${ios_flags[@]}" \
  552. "${xcb_flags[@]}" \
  553. build \
  554. test
  555. ;;
  556. # Note that the combine tests require setting the minimum iOS version to 13.0
  557. *-*-spm)
  558. RunXcodebuild \
  559. -scheme $product \
  560. "${xcb_flags[@]}" \
  561. IPHONEOS_DEPLOYMENT_TARGET=13.0 \
  562. test
  563. ;;
  564. *-*-spmbuildonly)
  565. RunXcodebuild \
  566. -scheme $product \
  567. "${xcb_flags[@]}" \
  568. build
  569. ;;
  570. *)
  571. echo "Don't know how to build this product-platform-method combination" 1>&2
  572. echo " product=$product" 1>&2
  573. echo " platform=$platform" 1>&2
  574. echo " method=$method" 1>&2
  575. exit 1
  576. ;;
  577. esac